public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/14] Bump minimum version of LLVM for building the kernel to 17.0.1
@ 2026-04-29  2:59 Nathan Chancellor
  2026-04-29  2:59 ` [PATCH 01/14] kbuild: " Nathan Chancellor
                   ` (13 more replies)
  0 siblings, 14 replies; 27+ messages in thread
From: Nathan Chancellor @ 2026-04-29  2:59 UTC (permalink / raw)
  To: Nathan Chancellor, Nicolas Schier, Bill Wendling, Justin Stitt,
	Nick Desaulniers
  Cc: linux-kernel, llvm, linux-kbuild, Jonathan Corbet, Shuah Khan,
	linux-doc, Kees Cook, Gustavo A. R. Silva, linux-hardening,
	linux-security-module, Rong Xu, Han Shen, Russell King,
	Arnd Bergmann, linux-arm-kernel, Paul Walmsley, Palmer Dabbelt,
	Albert Ou, Alexandre Ghiti, linux-riscv, Thomas Gleixner,
	Ingo Molnar, Borislav Petkov, Dave Hansen, x86, H. Peter Anvin,
	Peter Zijlstra, Ard Biesheuvel

The current minimum version of LLVM for building the kernel is 15.0.0.
However, there are two deficiencies compared to GCC that were fixed in
LLVM 17 that are starting to become more noticeable.

The first was a bug in LLVM's scope checker [1], where all labels in a
function were validated as potential targets of an asm goto statement,
even if they were not listed in the asm goto statement as targets. This
becomes particularly problematic when the cleanup attribute is used, as

  asm goto(... : label_a);
  ...
label_a:
  ...
  int var __free(foo);
  asm goto(... : label_b);
  ...
label_b:
  ...

will trigger an error since the scope checker will complain that the
cleanup variable would be skipped when jumping from the first asm goto
to label_b (which obviously cannot happen). This issue was the catalyst
for commit e2ffa15b9baa ("kbuild: Disable CC_HAS_ASM_GOTO_OUTPUT on
clang < 17"). Unfortunately, this issue is reproducible with regular asm
goto in addition to asm goto with outputs, so that change was not
entirely sufficient to avoid the issue altogether. As asm goto has
effectively been required since commit a0a12c3ed057 ("asm goto:
eradicate CC_HAS_ASM_GOTO") and the usage of the cleanup attribute
continues to grow across the tree, raising the minimum to a version that
avoids this issue altogether is a better long term solution than
attempting to workaround it at every spot where it happens.

The second issue is an incompatibility with GCC 8.1+ around variables
marked with const being valid constant expressions for _Static_assert
and other macros [2]. With GCC 8.1 being the minimum supported version
since commit 118c40b7b503 ("kbuild: require gcc-8 and binutils-2.30"),
this incompatibility becomes more of a maintenance burden since only
clang-15 and clang-16 are affected by it.

Looking at the clang version of various major distributions through
Docker images, no one should be left behind as a result of this bump, as
the old ones cannot clear the current minimum of 15.0.0.

  archlinux:latest              clang version 22.1.3
  debian:oldoldstable-slim      Debian clang version 11.0.1-2
  debian:oldstable-slim         Debian clang version 14.0.6
  debian:stable-slim            Debian clang version 19.1.7 (3+b1)
  debian:testing-slim           Debian clang version 21.1.8 (3+b1)
  debian:unstable-slim          Debian clang version 21.1.8 (7+b1)
  fedora:42                     clang version 20.1.8 (Fedora 20.1.8-4.fc42)
  fedora:latest                 clang version 21.1.8 (Fedora 21.1.8-4.fc43)
  fedora:44                     clang version 22.1.1 (Fedora 22.1.1-2.fc44)
  fedora:rawhide                clang version 22.1.3 (Fedora 22.1.3-1.fc45)
  opensuse/leap:latest          clang version 17.0.6
  opensuse/tumbleweed:latest    clang version 21.1.8
  ubuntu:jammy                  Ubuntu clang version 14.0.0-1ubuntu1.1
  ubuntu:noble                  Ubuntu clang version 18.1.3 (1ubuntu1)
  ubuntu:questing               Ubuntu clang version 20.1.8 (0ubuntu4)
  ubuntu:resolute               Ubuntu clang version 21.1.8 (6ubuntu1)

17.0.1 is chosen as the minimum instead of 17.0.0 to ensure that the
particular version of LLVM 17 has the two aforementioned bugs fixed, as
the second was fixed during the 17.0.0 release candidate phase and it
was not until LLVM 18 that LLVM adopted the scheme of x.0.0 being a
prerelease version and x.1.0 is a release version [3] to help with
scenarios such as this.

The first patch in the series does the actual bump. The remaining
patches are cleanups of workarounds for various issues that are no
longer needed with the bump.

I plan to take this via the Kbuild tree for 7.2, please provide Acks as
necessary.

[1]: https://github.com/llvm/llvm-project/commit/f023f5cdb2e6c19026f04a15b5a935c041835d14
[2]: https://github.com/llvm/llvm-project/commit/0b2d5b967d98375793897295d651f58f6fbd3034
[3]: https://github.com/llvm/llvm-project/commit/4532617ae420056bf32f6403dde07fb99d276a49

---
Nathan Chancellor (14):
      kbuild: Bump minimum version of LLVM for building the kernel to 17.0.1
      security/Kconfig.hardening: Remove tautological condition from CC_HAS_ZERO_CALL_USED_REGS
      security/Kconfig.hardening: Remove tautological condition from FORTIFY_SOURCE
      security/Kconfig.hardening: Remove tautological condition from CC_HAS_RANDSTRUCT
      arch/Kconfig: Remove tautological conditions from HAS_LTO_CLANG
      arch/Kconfig: Remove tautological condition from AUTOFDO_CLANG
      ARM: Drop tautological ld.lld conditions from ARCH_MULTI_V4{,T}
      riscv: Remove tautological condition from selection of ARCH_SUPPORTS_CFI
      riscv: Drop tautological condition from TOOLCHAIN_NEEDS_OLD_ISA_SPEC
      scripts/Makefile.warn: Drop -Wformat handling for clang < 16
      x86/build: Drop unused '-ffreestanding' addition to KBUILD_CFLAGS
      x86/module: Revert "Deal with GOT based stack cookie load on Clang < 17"
      x86/entry/vdso32: Remove conditional omission of '.cfi_offset eflags'
      kbuild: Remove check for broken scoping with clang < 17 in CC_HAS_ASM_GOTO_OUTPUT

 Documentation/process/changes.rst      |  2 +-
 arch/Kconfig                           |  5 +----
 arch/arm/Kconfig.platforms             |  4 ----
 arch/riscv/Kconfig                     | 16 +++++++---------
 arch/x86/Makefile                      |  5 -----
 arch/x86/entry/vdso/vdso32/sigreturn.S | 10 ----------
 arch/x86/include/asm/elf.h             |  5 ++---
 arch/x86/kernel/module.c               | 15 ---------------
 init/Kconfig                           |  3 ---
 scripts/Makefile.warn                  | 10 ----------
 scripts/min-tool-version.sh            |  2 +-
 security/Kconfig.hardening             |  8 --------
 12 files changed, 12 insertions(+), 73 deletions(-)
---
base-commit: 254f49634ee16a731174d2ae34bc50bd5f45e731
change-id: 20260422-bump-minimum-supported-llvm-version-to-17-b4638a58b043

Best regards,
--  
Nathan Chancellor <nathan@kernel.org>


^ permalink raw reply	[flat|nested] 27+ messages in thread

* [PATCH 01/14] kbuild: Bump minimum version of LLVM for building the kernel to 17.0.1
  2026-04-29  2:59 [PATCH 00/14] Bump minimum version of LLVM for building the kernel to 17.0.1 Nathan Chancellor
@ 2026-04-29  2:59 ` Nathan Chancellor
  2026-05-05 15:27   ` Nicolas Schier
  2026-04-29  2:59 ` [PATCH 02/14] security/Kconfig.hardening: Remove tautological condition from CC_HAS_ZERO_CALL_USED_REGS Nathan Chancellor
                   ` (12 subsequent siblings)
  13 siblings, 1 reply; 27+ messages in thread
From: Nathan Chancellor @ 2026-04-29  2:59 UTC (permalink / raw)
  To: Nathan Chancellor, Nicolas Schier, Bill Wendling, Justin Stitt,
	Nick Desaulniers
  Cc: linux-kernel, llvm, linux-kbuild, Jonathan Corbet, Shuah Khan,
	linux-doc

The current minimum version of LLVM for building the kernel is 15.0.0.
However, there are two deficiencies compared to GCC that were fixed in
LLVM 17 that are starting to become more noticeable.

The first was a bug in LLVM's scope checker [1], where all labels in a
function were validated as potential targets of an asm goto statement,
even if they were not listed in the asm goto statement as targets. This
becomes particularly problematic when the cleanup attribute is used, as

  asm goto(... : label_a);
  ...
label_a:
  ...
  int var __free(foo);
  asm goto(... : label_b);
  ...
label_b:
  ...

will trigger an error since the scope checker will complain that the
cleanup variable would be skipped when jumping from the first asm goto
to label_b (which obviously cannot happen). This issue was the catalyst
for commit e2ffa15b9baa ("kbuild: Disable CC_HAS_ASM_GOTO_OUTPUT on
clang < 17"). Unfortunately, this issue is reproducible with regular asm
goto in addition to asm goto with outputs, so that change was not
entirely sufficient to avoid the issue altogether. As asm goto has
effectively been required since commit a0a12c3ed057 ("asm goto:
eradicate CC_HAS_ASM_GOTO") and the usage of the cleanup attribute
continues to grow across the tree, raising the minimum to a version that
avoids this issue altogether is a better long term solution than
attempting to workaround it at every spot where it happens.

The second issue is an incompatibility with GCC 8.1+ around variables
marked with const being valid constant expressions for _Static_assert
and other macros [2]. With GCC 8.1 being the minimum supported version
since commit 118c40b7b503 ("kbuild: require gcc-8 and binutils-2.30"),
this incompatibility becomes more of a maintenance burden since only
clang-15 and clang-16 are affected by it.

Looking at the clang version of various major distributions through
Docker images, no one should be left behind as a result of this bump, as
the old ones cannot clear the current minimum of 15.0.0.

  archlinux:latest              clang version 22.1.3
  debian:oldoldstable-slim      Debian clang version 11.0.1-2
  debian:oldstable-slim         Debian clang version 14.0.6
  debian:stable-slim            Debian clang version 19.1.7 (3+b1)
  debian:testing-slim           Debian clang version 21.1.8 (3+b1)
  debian:unstable-slim          Debian clang version 21.1.8 (7+b1)
  fedora:42                     clang version 20.1.8 (Fedora 20.1.8-4.fc42)
  fedora:latest                 clang version 21.1.8 (Fedora 21.1.8-4.fc43)
  fedora:44                     clang version 22.1.1 (Fedora 22.1.1-2.fc44)
  fedora:rawhide                clang version 22.1.3 (Fedora 22.1.3-1.fc45)
  opensuse/leap:latest          clang version 17.0.6
  opensuse/tumbleweed:latest    clang version 21.1.8
  ubuntu:jammy                  Ubuntu clang version 14.0.0-1ubuntu1.1
  ubuntu:noble                  Ubuntu clang version 18.1.3 (1ubuntu1)
  ubuntu:questing               Ubuntu clang version 20.1.8 (0ubuntu4)
  ubuntu:resolute               Ubuntu clang version 21.1.8 (6ubuntu1)

17.0.1 is chosen as the minimum instead of 17.0.0 to ensure that the
particular version of LLVM 17 has the two aforementioned bugs fixed, as
the second was fixed during the 17.0.0 release candidate phase and it
was not until LLVM 18 that LLVM adopted the scheme of x.0.0 being a
prerelease version and x.1.0 is a release version [3] to help with
scenarios such as this.

Link: https://github.com/llvm/llvm-project/commit/f023f5cdb2e6c19026f04a15b5a935c041835d14 [1]
Link: https://github.com/llvm/llvm-project/commit/0b2d5b967d98375793897295d651f58f6fbd3034 [2]
Link: https://github.com/llvm/llvm-project/commit/4532617ae420056bf32f6403dde07fb99d276a49 [3]
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
---
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Shuah Khan <skhan@linuxfoundation.org>
Cc: linux-doc@vger.kernel.org
---
 Documentation/process/changes.rst | 2 +-
 scripts/min-tool-version.sh       | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/process/changes.rst b/Documentation/process/changes.rst
index 9a99037270ff..b9afce768446 100644
--- a/Documentation/process/changes.rst
+++ b/Documentation/process/changes.rst
@@ -36,7 +36,7 @@ bindgen (optional)     0.71.1           bindgen --version
 binutils               2.30             ld -v
 bison                  2.0              bison --version
 btrfs-progs            0.18             btrfs --version
-Clang/LLVM (optional)  15.0.0           clang --version
+Clang/LLVM (optional)  17.0.1           clang --version
 e2fsprogs              1.41.4           e2fsck -V
 flex                   2.5.35           flex --version
 gdb                    7.2              gdb --version
diff --git a/scripts/min-tool-version.sh b/scripts/min-tool-version.sh
index b96ec2d379b6..ea2689bc9641 100755
--- a/scripts/min-tool-version.sh
+++ b/scripts/min-tool-version.sh
@@ -27,7 +27,7 @@ llvm)
 	if [ "$SRCARCH" = loongarch ]; then
 		echo 18.0.0
 	else
-		echo 15.0.0
+		echo 17.0.1
 	fi
 	;;
 rustc)

-- 
2.54.0


^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [PATCH 02/14] security/Kconfig.hardening: Remove tautological condition from CC_HAS_ZERO_CALL_USED_REGS
  2026-04-29  2:59 [PATCH 00/14] Bump minimum version of LLVM for building the kernel to 17.0.1 Nathan Chancellor
  2026-04-29  2:59 ` [PATCH 01/14] kbuild: " Nathan Chancellor
@ 2026-04-29  2:59 ` Nathan Chancellor
  2026-05-05 15:28   ` Nicolas Schier
  2026-04-29  2:59 ` [PATCH 03/14] security/Kconfig.hardening: Remove tautological condition from FORTIFY_SOURCE Nathan Chancellor
                   ` (11 subsequent siblings)
  13 siblings, 1 reply; 27+ messages in thread
From: Nathan Chancellor @ 2026-04-29  2:59 UTC (permalink / raw)
  To: Nathan Chancellor, Nicolas Schier, Bill Wendling, Justin Stitt,
	Nick Desaulniers
  Cc: linux-kernel, llvm, linux-kbuild, Kees Cook, Gustavo A. R. Silva,
	linux-hardening, linux-security-module

Now that the minimum supported version of LLVM for building the kernel
has been raised to 17.0.1, the '!Clang || Clang > 15.0.6' dependency for
CONFIG_CC_HAS_ZERO_CALL_USED_REGS is always true, so it can be removed.

Signed-off-by: Nathan Chancellor <nathan@kernel.org>
---
Cc: Kees Cook <kees@kernel.org>
Cc: Gustavo A. R. Silva <gustavoars@kernel.org>
Cc: linux-hardening@vger.kernel.org
Cc: linux-security-module@vger.kernel.org
---
 security/Kconfig.hardening | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/security/Kconfig.hardening b/security/Kconfig.hardening
index 86f8768c63d4..a0461d648396 100644
--- a/security/Kconfig.hardening
+++ b/security/Kconfig.hardening
@@ -189,9 +189,6 @@ config INIT_ON_FREE_DEFAULT_ON
 
 config CC_HAS_ZERO_CALL_USED_REGS
 	def_bool $(cc-option,-fzero-call-used-regs=used-gpr)
-	# https://github.com/ClangBuiltLinux/linux/issues/1766
-	# https://github.com/llvm/llvm-project/issues/59242
-	depends on !CC_IS_CLANG || CLANG_VERSION > 150006
 
 config ZERO_CALL_USED_REGS
 	bool "Enable register zeroing on function exit"

-- 
2.54.0


^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [PATCH 03/14] security/Kconfig.hardening: Remove tautological condition from FORTIFY_SOURCE
  2026-04-29  2:59 [PATCH 00/14] Bump minimum version of LLVM for building the kernel to 17.0.1 Nathan Chancellor
  2026-04-29  2:59 ` [PATCH 01/14] kbuild: " Nathan Chancellor
  2026-04-29  2:59 ` [PATCH 02/14] security/Kconfig.hardening: Remove tautological condition from CC_HAS_ZERO_CALL_USED_REGS Nathan Chancellor
@ 2026-04-29  2:59 ` Nathan Chancellor
  2026-05-05 15:28   ` Nicolas Schier
  2026-04-29  2:59 ` [PATCH 04/14] security/Kconfig.hardening: Remove tautological condition from CC_HAS_RANDSTRUCT Nathan Chancellor
                   ` (10 subsequent siblings)
  13 siblings, 1 reply; 27+ messages in thread
From: Nathan Chancellor @ 2026-04-29  2:59 UTC (permalink / raw)
  To: Nathan Chancellor, Nicolas Schier, Bill Wendling, Justin Stitt,
	Nick Desaulniers
  Cc: linux-kernel, llvm, linux-kbuild, Kees Cook, Gustavo A. R. Silva,
	linux-hardening, linux-security-module

Now that the minimum supported version of LLVM for building the kernel
has been raised to 17.0.1, the '!X86_32 || !Clang || Clang > 16'
dependency of CONFIG_FORTIFY_SOURCE is always true, so it can be
removed.

Signed-off-by: Nathan Chancellor <nathan@kernel.org>
---
Cc: Kees Cook <kees@kernel.org>
Cc: Gustavo A. R. Silva <gustavoars@kernel.org>
Cc: linux-hardening@vger.kernel.org
Cc: linux-security-module@vger.kernel.org
---
 security/Kconfig.hardening | 2 --
 1 file changed, 2 deletions(-)

diff --git a/security/Kconfig.hardening b/security/Kconfig.hardening
index a0461d648396..e4f23c08a17a 100644
--- a/security/Kconfig.hardening
+++ b/security/Kconfig.hardening
@@ -213,8 +213,6 @@ menu "Bounds checking"
 config FORTIFY_SOURCE
 	bool "Harden common str/mem functions against buffer overflows"
 	depends on ARCH_HAS_FORTIFY_SOURCE
-	# https://github.com/llvm/llvm-project/issues/53645
-	depends on !X86_32 || !CC_IS_CLANG || CLANG_VERSION >= 160000
 	help
 	  Detect overflows of buffers in common string and memory functions
 	  where the compiler can determine and validate the buffer sizes.

-- 
2.54.0


^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [PATCH 04/14] security/Kconfig.hardening: Remove tautological condition from CC_HAS_RANDSTRUCT
  2026-04-29  2:59 [PATCH 00/14] Bump minimum version of LLVM for building the kernel to 17.0.1 Nathan Chancellor
                   ` (2 preceding siblings ...)
  2026-04-29  2:59 ` [PATCH 03/14] security/Kconfig.hardening: Remove tautological condition from FORTIFY_SOURCE Nathan Chancellor
@ 2026-04-29  2:59 ` Nathan Chancellor
  2026-05-05 15:28   ` Nicolas Schier
  2026-04-29  2:59 ` [PATCH 05/14] arch/Kconfig: Remove tautological conditions from HAS_LTO_CLANG Nathan Chancellor
                   ` (9 subsequent siblings)
  13 siblings, 1 reply; 27+ messages in thread
From: Nathan Chancellor @ 2026-04-29  2:59 UTC (permalink / raw)
  To: Nathan Chancellor, Nicolas Schier, Bill Wendling, Justin Stitt,
	Nick Desaulniers
  Cc: linux-kernel, llvm, linux-kbuild, Kees Cook, Gustavo A. R. Silva,
	linux-hardening, linux-security-module

Now that the minimum supported version of LLVM for building the kernel
has been raised to 17.0.1, the '!Clang || Clang >= 16' dependency for
CONFIG_CC_HAS_RANDSTRUCT is always true, so it can be removed.

Signed-off-by: Nathan Chancellor <nathan@kernel.org>
---
Cc: Kees Cook <kees@kernel.org>
Cc: Gustavo A. R. Silva <gustavoars@kernel.org>
Cc: linux-hardening@vger.kernel.org
Cc: linux-security-module@vger.kernel.org
---
 security/Kconfig.hardening | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/security/Kconfig.hardening b/security/Kconfig.hardening
index e4f23c08a17a..b90cf9ed4642 100644
--- a/security/Kconfig.hardening
+++ b/security/Kconfig.hardening
@@ -274,9 +274,6 @@ endmenu
 
 config CC_HAS_RANDSTRUCT
 	def_bool $(cc-option,-frandomize-layout-seed-file=/dev/null)
-	# Randstruct was first added in Clang 15, but it isn't safe to use until
-	# Clang 16 due to https://github.com/llvm/llvm-project/issues/60349
-	depends on !CC_IS_CLANG || CLANG_VERSION >= 160000
 
 choice
 	prompt "Randomize layout of sensitive kernel structures"

-- 
2.54.0


^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [PATCH 05/14] arch/Kconfig: Remove tautological conditions from HAS_LTO_CLANG
  2026-04-29  2:59 [PATCH 00/14] Bump minimum version of LLVM for building the kernel to 17.0.1 Nathan Chancellor
                   ` (3 preceding siblings ...)
  2026-04-29  2:59 ` [PATCH 04/14] security/Kconfig.hardening: Remove tautological condition from CC_HAS_RANDSTRUCT Nathan Chancellor
@ 2026-04-29  2:59 ` Nathan Chancellor
  2026-05-05 15:30   ` Nicolas Schier
  2026-04-29  2:59 ` [PATCH 06/14] arch/Kconfig: Remove tautological condition from AUTOFDO_CLANG Nathan Chancellor
                   ` (8 subsequent siblings)
  13 siblings, 1 reply; 27+ messages in thread
From: Nathan Chancellor @ 2026-04-29  2:59 UTC (permalink / raw)
  To: Nathan Chancellor, Nicolas Schier, Bill Wendling, Justin Stitt,
	Nick Desaulniers
  Cc: linux-kernel, llvm, linux-kbuild

Now that the minimum supported version of LLVM for building the kernel
has been raised to 17.0.1, two dependency lines in CONFIG_HAS_LTO_CLANG
are always true because Clang will always be newer than 17.0.0, so they
can be removed.

Signed-off-by: Nathan Chancellor <nathan@kernel.org>
---
 arch/Kconfig | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/arch/Kconfig b/arch/Kconfig
index e86880045158..0d34bcafecaa 100644
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -806,9 +806,6 @@ config HAS_LTO_CLANG
 	depends on $(success,$(AR) --help | head -n 1 | grep -qi llvm)
 	depends on ARCH_SUPPORTS_LTO_CLANG
 	depends on !FTRACE_MCOUNT_USE_RECORDMCOUNT
-	# https://github.com/ClangBuiltLinux/linux/issues/1721
-	depends on (!KASAN || KASAN_HW_TAGS || CLANG_VERSION >= 170000) || !DEBUG_INFO
-	depends on (!KCOV || CLANG_VERSION >= 170000) || !DEBUG_INFO
 	depends on !GCOV_KERNEL
 	help
 	  The compiler and Kconfig options support building with Clang's

-- 
2.54.0


^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [PATCH 06/14] arch/Kconfig: Remove tautological condition from AUTOFDO_CLANG
  2026-04-29  2:59 [PATCH 00/14] Bump minimum version of LLVM for building the kernel to 17.0.1 Nathan Chancellor
                   ` (4 preceding siblings ...)
  2026-04-29  2:59 ` [PATCH 05/14] arch/Kconfig: Remove tautological conditions from HAS_LTO_CLANG Nathan Chancellor
@ 2026-04-29  2:59 ` Nathan Chancellor
  2026-04-29 16:43   ` Rong Xu
  2026-04-29  2:59 ` [PATCH 07/14] ARM: Drop tautological ld.lld conditions from ARCH_MULTI_V4{,T} Nathan Chancellor
                   ` (7 subsequent siblings)
  13 siblings, 1 reply; 27+ messages in thread
From: Nathan Chancellor @ 2026-04-29  2:59 UTC (permalink / raw)
  To: Nathan Chancellor, Nicolas Schier, Bill Wendling, Justin Stitt,
	Nick Desaulniers
  Cc: linux-kernel, llvm, linux-kbuild, Rong Xu, Han Shen

Now that the minimum supported version of LLVM for building the kernel
has been raised to 17.0.1, the clang version check in
CONFIG_AUTOFDO_CLANG can be removed because it is always true.

Signed-off-by: Nathan Chancellor <nathan@kernel.org>
---
Cc: Rong Xu <xur@google.com>
Cc: Han Shen <shenhan@google.com>
---
 arch/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/Kconfig b/arch/Kconfig
index 0d34bcafecaa..5d6e9f56210b 100644
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -866,7 +866,7 @@ config ARCH_SUPPORTS_AUTOFDO_CLANG
 config AUTOFDO_CLANG
 	bool "Enable Clang's AutoFDO build (EXPERIMENTAL)"
 	depends on ARCH_SUPPORTS_AUTOFDO_CLANG
-	depends on CC_IS_CLANG && CLANG_VERSION >= 170000
+	depends on CC_IS_CLANG
 	help
 	  This option enables Clang’s AutoFDO build. When
 	  an AutoFDO profile is specified in variable

-- 
2.54.0


^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [PATCH 07/14] ARM: Drop tautological ld.lld conditions from ARCH_MULTI_V4{,T}
  2026-04-29  2:59 [PATCH 00/14] Bump minimum version of LLVM for building the kernel to 17.0.1 Nathan Chancellor
                   ` (5 preceding siblings ...)
  2026-04-29  2:59 ` [PATCH 06/14] arch/Kconfig: Remove tautological condition from AUTOFDO_CLANG Nathan Chancellor
@ 2026-04-29  2:59 ` Nathan Chancellor
  2026-04-29  2:59 ` [PATCH 08/14] riscv: Remove tautological condition from selection of ARCH_SUPPORTS_CFI Nathan Chancellor
                   ` (6 subsequent siblings)
  13 siblings, 0 replies; 27+ messages in thread
From: Nathan Chancellor @ 2026-04-29  2:59 UTC (permalink / raw)
  To: Nathan Chancellor, Nicolas Schier, Bill Wendling, Justin Stitt,
	Nick Desaulniers
  Cc: linux-kernel, llvm, linux-kbuild, Russell King, Arnd Bergmann,
	linux-arm-kernel

Now that the minimum supported version of LLVM for building the kernel
has been raised to 17.0.1, the '!ld.lld || ld.lld >= 16' dependency of
CONFIG_ARCH_MULTI_V4{,T} is always true, so tit can be removed from both
symbols.

Signed-off-by: Nathan Chancellor <nathan@kernel.org>
---
Cc: Russell King <linux@armlinux.org.uk>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: linux-arm-kernel@lists.infradead.org
---
 arch/arm/Kconfig.platforms | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/arch/arm/Kconfig.platforms b/arch/arm/Kconfig.platforms
index 5c19c1f2cff6..386eccc81868 100644
--- a/arch/arm/Kconfig.platforms
+++ b/arch/arm/Kconfig.platforms
@@ -8,16 +8,12 @@ comment "CPU Core family selection"
 config ARCH_MULTI_V4
 	bool "ARMv4 based platforms (FA526, StrongARM)"
 	depends on !ARCH_MULTI_V6_V7
-	# https://github.com/llvm/llvm-project/issues/50764
-	depends on !LD_IS_LLD || LLD_VERSION >= 160000
 	select ARCH_MULTI_V4_V5
 	select CPU_FA526 if !(CPU_SA110 || CPU_SA1100)
 
 config ARCH_MULTI_V4T
 	bool "ARMv4T based platforms (ARM720T, ARM920T, ...)"
 	depends on !ARCH_MULTI_V6_V7
-	# https://github.com/llvm/llvm-project/issues/50764
-	depends on !LD_IS_LLD || LLD_VERSION >= 160000
 	select ARCH_MULTI_V4_V5
 	select CPU_ARM920T if !(CPU_ARM7TDMI || CPU_ARM720T || \
 		CPU_ARM740T || CPU_ARM9TDMI || CPU_ARM922T || \

-- 
2.54.0


^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [PATCH 08/14] riscv: Remove tautological condition from selection of ARCH_SUPPORTS_CFI
  2026-04-29  2:59 [PATCH 00/14] Bump minimum version of LLVM for building the kernel to 17.0.1 Nathan Chancellor
                   ` (6 preceding siblings ...)
  2026-04-29  2:59 ` [PATCH 07/14] ARM: Drop tautological ld.lld conditions from ARCH_MULTI_V4{,T} Nathan Chancellor
@ 2026-04-29  2:59 ` Nathan Chancellor
  2026-04-29  2:59 ` [PATCH 09/14] riscv: Drop tautological condition from TOOLCHAIN_NEEDS_OLD_ISA_SPEC Nathan Chancellor
                   ` (5 subsequent siblings)
  13 siblings, 0 replies; 27+ messages in thread
From: Nathan Chancellor @ 2026-04-29  2:59 UTC (permalink / raw)
  To: Nathan Chancellor, Nicolas Schier, Bill Wendling, Justin Stitt,
	Nick Desaulniers
  Cc: linux-kernel, llvm, linux-kbuild, Paul Walmsley, Palmer Dabbelt,
	Albert Ou, Alexandre Ghiti, Kees Cook, linux-riscv,
	linux-hardening

Now that the minimum supported version of LLVM for building the kernel
has been raised to 17.0.1, the condition of the selection of
CONFIG_ARCH_SUPPORTS_CFI is always true, so it can be removed.

Signed-off-by: Nathan Chancellor <nathan@kernel.org>
---
Cc: Paul Walmsley <pjw@kernel.org>
Cc: Palmer Dabbelt <palmer@dabbelt.com>
Cc: Albert Ou <aou@eecs.berkeley.edu>
Cc: Alexandre Ghiti <alex@ghiti.fr>
Cc: Kees Cook <kees@kernel.org>
Cc: linux-riscv@lists.infradead.org
Cc: linux-hardening@vger.kernel.org
---
 arch/riscv/Kconfig | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
index d235396c4514..7ffbf6032b61 100644
--- a/arch/riscv/Kconfig
+++ b/arch/riscv/Kconfig
@@ -61,8 +61,7 @@ config RISCV
 	select ARCH_OPTIONAL_KERNEL_RWX_DEFAULT
 	select ARCH_STACKWALK
 	select ARCH_SUPPORTS_ATOMIC_RMW
-	# clang >= 17: https://github.com/llvm/llvm-project/commit/62fa708ceb027713b386c7e0efda994f8bdc27e2
-	select ARCH_SUPPORTS_CFI if (!CC_IS_CLANG || CLANG_VERSION >= 170000)
+	select ARCH_SUPPORTS_CFI
 	select ARCH_SUPPORTS_DEBUG_PAGEALLOC if MMU
 	select ARCH_SUPPORTS_HUGE_PFNMAP if TRANSPARENT_HUGEPAGE
 	select ARCH_SUPPORTS_HUGETLBFS if MMU

-- 
2.54.0


^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [PATCH 09/14] riscv: Drop tautological condition from TOOLCHAIN_NEEDS_OLD_ISA_SPEC
  2026-04-29  2:59 [PATCH 00/14] Bump minimum version of LLVM for building the kernel to 17.0.1 Nathan Chancellor
                   ` (7 preceding siblings ...)
  2026-04-29  2:59 ` [PATCH 08/14] riscv: Remove tautological condition from selection of ARCH_SUPPORTS_CFI Nathan Chancellor
@ 2026-04-29  2:59 ` Nathan Chancellor
  2026-04-29  2:59 ` [PATCH 10/14] scripts/Makefile.warn: Drop -Wformat handling for clang < 16 Nathan Chancellor
                   ` (4 subsequent siblings)
  13 siblings, 0 replies; 27+ messages in thread
From: Nathan Chancellor @ 2026-04-29  2:59 UTC (permalink / raw)
  To: Nathan Chancellor, Nicolas Schier, Bill Wendling, Justin Stitt,
	Nick Desaulniers
  Cc: linux-kernel, llvm, linux-kbuild, Paul Walmsley, Palmer Dabbelt,
	Albert Ou, Alexandre Ghiti, linux-riscv

Now that the minimum supported version of LLVM for building the kernel
has been raised to 17.0.1, the Clang dependency part of
CONFIG_TOOLCHAIN_NEEDS_OLD_ISA_SPEC is always false, so it can be
removed. Adjust the help text to remove mention of Clang < 17, as it is
irrelevant for the kernel after the minimum supported bump.

Signed-off-by: Nathan Chancellor <nathan@kernel.org>
---
Cc: Paul Walmsley <pjw@kernel.org>
Cc: Palmer Dabbelt <palmer@dabbelt.com>
Cc: Albert Ou <aou@eecs.berkeley.edu>
Cc: Alexandre Ghiti <alex@ghiti.fr>
Cc: linux-riscv@lists.infradead.org
---
 arch/riscv/Kconfig | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
index 7ffbf6032b61..c742c42fd39b 100644
--- a/arch/riscv/Kconfig
+++ b/arch/riscv/Kconfig
@@ -873,19 +873,18 @@ config TOOLCHAIN_NEEDS_EXPLICIT_ZICSR_ZIFENCEI
 	  and Zifencei are supported in binutils from version 2.36 onwards.
 	  To make life easier, and avoid forcing toolchains that default to a
 	  newer ISA spec to version 2.2, relax the check to binutils >= 2.36.
-	  For clang < 17 or GCC < 11.3.0, for which this is not possible or need
-	  special treatment, this is dealt with in TOOLCHAIN_NEEDS_OLD_ISA_SPEC.
+	  For GCC < 11.3.0, for which this is not possible or need special
+	  treatment, this is dealt with in TOOLCHAIN_NEEDS_OLD_ISA_SPEC.
 
 config TOOLCHAIN_NEEDS_OLD_ISA_SPEC
 	def_bool y
 	depends on TOOLCHAIN_NEEDS_EXPLICIT_ZICSR_ZIFENCEI
-	# https://github.com/llvm/llvm-project/commit/22e199e6afb1263c943c0c0d4498694e15bf8a16
 	# https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=d29f5d6ab513c52fd872f532c492e35ae9fd6671
-	depends on (CC_IS_CLANG && CLANG_VERSION < 170000) || (CC_IS_GCC && GCC_VERSION < 110300)
+	depends on CC_IS_GCC && GCC_VERSION < 110300
 	help
-	  Certain versions of clang and GCC do not support zicsr and zifencei via
-	  -march. This option causes an older ISA spec compatible with these older
-	  versions of clang and GCC to be passed to GAS, which has the same result
+	  Certain versions of GCC do not support zicsr and zifencei via -march.
+	  This option causes an older ISA spec compatible with these older
+	  versions of GCC to be passed to GAS, which has the same result
 	  as passing zicsr and zifencei to -march.
 
 config FPU

-- 
2.54.0


^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [PATCH 10/14] scripts/Makefile.warn: Drop -Wformat handling for clang < 16
  2026-04-29  2:59 [PATCH 00/14] Bump minimum version of LLVM for building the kernel to 17.0.1 Nathan Chancellor
                   ` (8 preceding siblings ...)
  2026-04-29  2:59 ` [PATCH 09/14] riscv: Drop tautological condition from TOOLCHAIN_NEEDS_OLD_ISA_SPEC Nathan Chancellor
@ 2026-04-29  2:59 ` Nathan Chancellor
  2026-05-05 15:31   ` Nicolas Schier
  2026-04-29  2:59 ` [PATCH 11/14] x86/build: Drop unused '-ffreestanding' addition to KBUILD_CFLAGS Nathan Chancellor
                   ` (3 subsequent siblings)
  13 siblings, 1 reply; 27+ messages in thread
From: Nathan Chancellor @ 2026-04-29  2:59 UTC (permalink / raw)
  To: Nathan Chancellor, Nicolas Schier, Bill Wendling, Justin Stitt,
	Nick Desaulniers
  Cc: linux-kernel, llvm, linux-kbuild

Now that the minimum supported version of LLVM for building the kernel
has been raised to 17.0.1, the block dealing with -Wformat with clang
prior to 16 can be removed since the condition for its inclusion is
always false.

Signed-off-by: Nathan Chancellor <nathan@kernel.org>
---
 scripts/Makefile.warn | 10 ----------
 1 file changed, 10 deletions(-)

diff --git a/scripts/Makefile.warn b/scripts/Makefile.warn
index e77ca875aea4..35af7d6c6d18 100644
--- a/scripts/Makefile.warn
+++ b/scripts/Makefile.warn
@@ -135,16 +135,6 @@ KBUILD_CFLAGS += $(call cc-option, -Wno-stringop-truncation)
 KBUILD_CFLAGS += -Wno-override-init # alias for -Wno-initializer-overrides in clang
 
 ifdef CONFIG_CC_IS_CLANG
-# Clang before clang-16 would warn on default argument promotions.
-ifneq ($(call clang-min-version, 160000),y)
-# Disable -Wformat
-KBUILD_CFLAGS += -Wno-format
-# Then re-enable flags that were part of the -Wformat group that aren't
-# problematic.
-KBUILD_CFLAGS += -Wformat-extra-args -Wformat-invalid-specifier
-KBUILD_CFLAGS += -Wformat-zero-length -Wnonnull
-KBUILD_CFLAGS += -Wformat-insufficient-args
-endif
 KBUILD_CFLAGS += -Wno-pointer-to-enum-cast
 KBUILD_CFLAGS += -Wno-tautological-constant-out-of-range-compare
 KBUILD_CFLAGS += -Wno-unaligned-access

-- 
2.54.0


^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [PATCH 11/14] x86/build: Drop unused '-ffreestanding' addition to KBUILD_CFLAGS
  2026-04-29  2:59 [PATCH 00/14] Bump minimum version of LLVM for building the kernel to 17.0.1 Nathan Chancellor
                   ` (9 preceding siblings ...)
  2026-04-29  2:59 ` [PATCH 10/14] scripts/Makefile.warn: Drop -Wformat handling for clang < 16 Nathan Chancellor
@ 2026-04-29  2:59 ` Nathan Chancellor
  2026-04-29 17:24   ` Nathan Chancellor
  2026-04-29  2:59 ` [PATCH 12/14] x86/module: Revert "Deal with GOT based stack cookie load on Clang < 17" Nathan Chancellor
                   ` (2 subsequent siblings)
  13 siblings, 1 reply; 27+ messages in thread
From: Nathan Chancellor @ 2026-04-29  2:59 UTC (permalink / raw)
  To: Nathan Chancellor, Nicolas Schier, Bill Wendling, Justin Stitt,
	Nick Desaulniers
  Cc: linux-kernel, llvm, linux-kbuild, Thomas Gleixner, Ingo Molnar,
	Borislav Petkov, Dave Hansen, x86, H. Peter Anvin

Now that the minimum supported version of LLVM for building the kernel
has been raised to 17.0.1, the condition to add '-ffreestanding' to
KBUILD_CFLAGS for 32-bit x86 is always false, so the if block can be
removed.

Signed-off-by: Nathan Chancellor <nathan@kernel.org>
---
Cc: Thomas Gleixner <tglx@kernel.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: x86@kernel.org
Cc: H. Peter Anvin <hpa@zytor.com>
---
 arch/x86/Makefile | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/arch/x86/Makefile b/arch/x86/Makefile
index 46fec0b08487..5720f2470cfc 100644
--- a/arch/x86/Makefile
+++ b/arch/x86/Makefile
@@ -124,11 +124,6 @@ ifeq ($(CONFIG_X86_32),y)
         include $(srctree)/arch/x86/Makefile_32.cpu
         KBUILD_CFLAGS += $(cflags-y)
 
-    ifneq ($(call clang-min-version, 160000),y)
-        # https://github.com/llvm/llvm-project/issues/53645
-        KBUILD_CFLAGS += -ffreestanding
-    endif
-
         percpu_seg := fs
 else
         BITS := 64

-- 
2.54.0


^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [PATCH 12/14] x86/module: Revert "Deal with GOT based stack cookie load on Clang < 17"
  2026-04-29  2:59 [PATCH 00/14] Bump minimum version of LLVM for building the kernel to 17.0.1 Nathan Chancellor
                   ` (10 preceding siblings ...)
  2026-04-29  2:59 ` [PATCH 11/14] x86/build: Drop unused '-ffreestanding' addition to KBUILD_CFLAGS Nathan Chancellor
@ 2026-04-29  2:59 ` Nathan Chancellor
  2026-04-29  7:10   ` Ard Biesheuvel
  2026-04-29  2:59 ` [PATCH 13/14] x86/entry/vdso32: Remove conditional omission of '.cfi_offset eflags' Nathan Chancellor
  2026-04-29  2:59 ` [PATCH 14/14] kbuild: Remove check for broken scoping with clang < 17 in CC_HAS_ASM_GOTO_OUTPUT Nathan Chancellor
  13 siblings, 1 reply; 27+ messages in thread
From: Nathan Chancellor @ 2026-04-29  2:59 UTC (permalink / raw)
  To: Nathan Chancellor, Nicolas Schier, Bill Wendling, Justin Stitt,
	Nick Desaulniers
  Cc: linux-kernel, llvm, linux-kbuild, Thomas Gleixner, Ingo Molnar,
	Borislav Petkov, Dave Hansen, Peter Zijlstra, x86, H. Peter Anvin,
	Ard Biesheuvel

Now that the minimum supported version of LLVM for building the kernel
has been raised to 17.0.1, the workaround added by

  78c4374ef8b8 ("x86/module: Deal with GOT based stack cookie load on Clang < 17")

will never be included, as the final clause in the preprocessor
conditional is always false. Revert the change to clean up the dead
code.

Signed-off-by: Nathan Chancellor <nathan@kernel.org>
---
Cc: Thomas Gleixner <tglx@kernel.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: x86@kernel.org
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Ard Biesheuvel <ardb@kernel.org>
---
 arch/x86/include/asm/elf.h |  5 ++---
 arch/x86/kernel/module.c   | 15 ---------------
 2 files changed, 2 insertions(+), 18 deletions(-)

diff --git a/arch/x86/include/asm/elf.h b/arch/x86/include/asm/elf.h
index c7f98977663c..0de9df759c99 100644
--- a/arch/x86/include/asm/elf.h
+++ b/arch/x86/include/asm/elf.h
@@ -54,9 +54,8 @@ typedef struct user_i387_struct elf_fpregset_t;
 #define R_X86_64_GLOB_DAT	6	/* Create GOT entry */
 #define R_X86_64_JUMP_SLOT	7	/* Create PLT entry */
 #define R_X86_64_RELATIVE	8	/* Adjust by program base */
-#define R_X86_64_GOTPCREL	9	/* 32 bit signed pc relative offset to GOT */
-#define R_X86_64_GOTPCRELX	41
-#define R_X86_64_REX_GOTPCRELX	42
+#define R_X86_64_GOTPCREL	9	/* 32 bit signed pc relative
+					   offset to GOT */
 #define R_X86_64_32		10	/* Direct 32 bit zero extended */
 #define R_X86_64_32S		11	/* Direct 32 bit sign extended */
 #define R_X86_64_16		12	/* Direct 16 bit zero extended */
diff --git a/arch/x86/kernel/module.c b/arch/x86/kernel/module.c
index 11c45ce42694..b5b4de4f08e6 100644
--- a/arch/x86/kernel/module.c
+++ b/arch/x86/kernel/module.c
@@ -19,7 +19,6 @@
 #include <linux/jump_label.h>
 #include <linux/random.h>
 #include <linux/memory.h>
-#include <linux/stackprotector.h>
 
 #include <asm/text-patching.h>
 #include <asm/page.h>
@@ -132,20 +131,6 @@ static int __write_relocate_add(Elf64_Shdr *sechdrs,
 				goto overflow;
 			size = 4;
 			break;
-#if defined(CONFIG_STACKPROTECTOR) && \
-    defined(CONFIG_CC_IS_CLANG) && CONFIG_CLANG_VERSION < 170000
-		case R_X86_64_REX_GOTPCRELX: {
-			static unsigned long __percpu *const addr = &__stack_chk_guard;
-
-			if (sym->st_value != (u64)addr) {
-				pr_err("%s: Unsupported GOTPCREL relocation\n", me->name);
-				return -ENOEXEC;
-			}
-
-			val = (u64)&addr + rel[i].r_addend;
-			fallthrough;
-		}
-#endif
 		case R_X86_64_PC32:
 		case R_X86_64_PLT32:
 			val -= (u64)loc;

-- 
2.54.0


^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [PATCH 13/14] x86/entry/vdso32: Remove conditional omission of '.cfi_offset eflags'
  2026-04-29  2:59 [PATCH 00/14] Bump minimum version of LLVM for building the kernel to 17.0.1 Nathan Chancellor
                   ` (11 preceding siblings ...)
  2026-04-29  2:59 ` [PATCH 12/14] x86/module: Revert "Deal with GOT based stack cookie load on Clang < 17" Nathan Chancellor
@ 2026-04-29  2:59 ` Nathan Chancellor
  2026-04-29  3:15   ` H. Peter Anvin
  2026-04-29  2:59 ` [PATCH 14/14] kbuild: Remove check for broken scoping with clang < 17 in CC_HAS_ASM_GOTO_OUTPUT Nathan Chancellor
  13 siblings, 1 reply; 27+ messages in thread
From: Nathan Chancellor @ 2026-04-29  2:59 UTC (permalink / raw)
  To: Nathan Chancellor, Nicolas Schier, Bill Wendling, Justin Stitt,
	Nick Desaulniers
  Cc: linux-kernel, llvm, linux-kbuild, Thomas Gleixner, Ingo Molnar,
	Borislav Petkov, Dave Hansen, Peter Zijlstra, x86, H. Peter Anvin

Now that the minimum supported version of LLVM for building the kernel
has been raised to 17.0.1, the inclusion condition added by

  3e30278e0c71 ("x86/entry/vdso32: Omit '.cfi_offset eflags' for LLVM < 16")

will always be true. Revert the change to clean up the source code.

Signed-off-by: Nathan Chancellor <nathan@kernel.org>
---
Cc: Thomas Gleixner <tglx@kernel.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: x86@kernel.org
Cc: H. Peter Anvin <hpa@zytor.com>
---
 arch/x86/entry/vdso/vdso32/sigreturn.S | 10 ----------
 1 file changed, 10 deletions(-)

diff --git a/arch/x86/entry/vdso/vdso32/sigreturn.S b/arch/x86/entry/vdso/vdso32/sigreturn.S
index b33fcc501ba3..328bd3a4ef51 100644
--- a/arch/x86/entry/vdso/vdso32/sigreturn.S
+++ b/arch/x86/entry/vdso/vdso32/sigreturn.S
@@ -22,17 +22,7 @@
 	CFI_OFFSET	cs,     IA32_SIGCONTEXT_cs
 	CFI_OFFSET	ss,     IA32_SIGCONTEXT_ss
 	CFI_OFFSET	ds,     IA32_SIGCONTEXT_ds
-/*
- * .cfi_offset eflags requires LLVM 16 or newer:
- *
- *   https://github.com/llvm/llvm-project/commit/67bd3c58c0c7389e39c5a2f4d3b1a30459ccf5b7
- *
- * Check for 16.0.1 to ensure the support is present, as 16.0.0 may be a
- * prerelease version.
- */
-#if defined(CONFIG_AS_IS_GNU) || (defined(CONFIG_AS_IS_LLVM) && CONFIG_AS_VERSION >= 160001)
 	CFI_OFFSET	eflags, IA32_SIGCONTEXT_flags
-#endif
 .endm
 
 /*

-- 
2.54.0


^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [PATCH 14/14] kbuild: Remove check for broken scoping with clang < 17 in CC_HAS_ASM_GOTO_OUTPUT
  2026-04-29  2:59 [PATCH 00/14] Bump minimum version of LLVM for building the kernel to 17.0.1 Nathan Chancellor
                   ` (12 preceding siblings ...)
  2026-04-29  2:59 ` [PATCH 13/14] x86/entry/vdso32: Remove conditional omission of '.cfi_offset eflags' Nathan Chancellor
@ 2026-04-29  2:59 ` Nathan Chancellor
  2026-05-05 15:32   ` Nicolas Schier
  13 siblings, 1 reply; 27+ messages in thread
From: Nathan Chancellor @ 2026-04-29  2:59 UTC (permalink / raw)
  To: Nathan Chancellor, Nicolas Schier, Bill Wendling, Justin Stitt,
	Nick Desaulniers
  Cc: linux-kernel, llvm, linux-kbuild, Thomas Gleixner, Peter Zijlstra

Now that the minimum supported version of LLVM for building the kernel
has been raised to 17.0.1, the check added to CC_HAS_ASM_GOTO_OUTPUT by
commit e2ffa15b9baa ("kbuild: Disable CC_HAS_ASM_GOTO_OUTPUT on clang <
17") can be removed, as the issue it detects is guaranteed to be fixed.

Signed-off-by: Nathan Chancellor <nathan@kernel.org>
---
Cc: Thomas Gleixner <tglx@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
---
 init/Kconfig | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/init/Kconfig b/init/Kconfig
index 2937c4d308ae..6da6cf019d1a 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -118,10 +118,7 @@ config GCC_ASM_GOTO_OUTPUT_BROKEN
 config CC_HAS_ASM_GOTO_OUTPUT
 	def_bool y
 	depends on !GCC_ASM_GOTO_OUTPUT_BROKEN
-	# Detect basic support
 	depends on $(success,echo 'int foo(int x) { asm goto ("": "=r"(x) ::: bar); return x; bar: return 0; }' | $(CC) -x c - -c -o /dev/null)
-	# Detect clang (< v17) scoped label issues
-	depends on $(success,echo 'void b(void **);void* c(void);int f(void){{asm goto(""::::l0);return 0;l0:return 1;}void *x __attribute__((cleanup(b)))=c();{asm goto(""::::l1);return 2;l1:return 3;}}' | $(CC) -x c - -c -o /dev/null)
 
 config CC_HAS_ASM_GOTO_TIED_OUTPUT
 	depends on CC_HAS_ASM_GOTO_OUTPUT

-- 
2.54.0


^ permalink raw reply related	[flat|nested] 27+ messages in thread

* Re: [PATCH 13/14] x86/entry/vdso32: Remove conditional omission of '.cfi_offset eflags'
  2026-04-29  2:59 ` [PATCH 13/14] x86/entry/vdso32: Remove conditional omission of '.cfi_offset eflags' Nathan Chancellor
@ 2026-04-29  3:15   ` H. Peter Anvin
  0 siblings, 0 replies; 27+ messages in thread
From: H. Peter Anvin @ 2026-04-29  3:15 UTC (permalink / raw)
  To: Nathan Chancellor, Nicolas Schier, Bill Wendling, Justin Stitt,
	Nick Desaulniers
  Cc: linux-kernel, llvm, linux-kbuild, Thomas Gleixner, Ingo Molnar,
	Borislav Petkov, Dave Hansen, Peter Zijlstra, x86

On April 28, 2026 7:59:19 PM PDT, Nathan Chancellor <nathan@kernel.org> wrote:
>Now that the minimum supported version of LLVM for building the kernel
>has been raised to 17.0.1, the inclusion condition added by
>
>  3e30278e0c71 ("x86/entry/vdso32: Omit '.cfi_offset eflags' for LLVM < 16")
>
>will always be true. Revert the change to clean up the source code.
>
>Signed-off-by: Nathan Chancellor <nathan@kernel.org>
>---
>Cc: Thomas Gleixner <tglx@kernel.org>
>Cc: Ingo Molnar <mingo@redhat.com>
>Cc: Borislav Petkov <bp@alien8.de>
>Cc: Dave Hansen <dave.hansen@linux.intel.com>
>Cc: Peter Zijlstra <peterz@infradead.org>
>Cc: x86@kernel.org
>Cc: H. Peter Anvin <hpa@zytor.com>
>---
> arch/x86/entry/vdso/vdso32/sigreturn.S | 10 ----------
> 1 file changed, 10 deletions(-)
>
>diff --git a/arch/x86/entry/vdso/vdso32/sigreturn.S b/arch/x86/entry/vdso/vdso32/sigreturn.S
>index b33fcc501ba3..328bd3a4ef51 100644
>--- a/arch/x86/entry/vdso/vdso32/sigreturn.S
>+++ b/arch/x86/entry/vdso/vdso32/sigreturn.S
>@@ -22,17 +22,7 @@
> 	CFI_OFFSET	cs,     IA32_SIGCONTEXT_cs
> 	CFI_OFFSET	ss,     IA32_SIGCONTEXT_ss
> 	CFI_OFFSET	ds,     IA32_SIGCONTEXT_ds
>-/*
>- * .cfi_offset eflags requires LLVM 16 or newer:
>- *
>- *   https://github.com/llvm/llvm-project/commit/67bd3c58c0c7389e39c5a2f4d3b1a30459ccf5b7
>- *
>- * Check for 16.0.1 to ensure the support is present, as 16.0.0 may be a
>- * prerelease version.
>- */
>-#if defined(CONFIG_AS_IS_GNU) || (defined(CONFIG_AS_IS_LLVM) && CONFIG_AS_VERSION >= 160001)
> 	CFI_OFFSET	eflags, IA32_SIGCONTEXT_flags
>-#endif
> .endm
> 
> /*
>

Acked-by: H. Peter Anvin (Intel) <hpa@zytor.com>

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PATCH 12/14] x86/module: Revert "Deal with GOT based stack cookie load on Clang < 17"
  2026-04-29  2:59 ` [PATCH 12/14] x86/module: Revert "Deal with GOT based stack cookie load on Clang < 17" Nathan Chancellor
@ 2026-04-29  7:10   ` Ard Biesheuvel
  0 siblings, 0 replies; 27+ messages in thread
From: Ard Biesheuvel @ 2026-04-29  7:10 UTC (permalink / raw)
  To: Nathan Chancellor, Nicolas Schier, Bill Wendling, Justin Stitt,
	Nick Desaulniers
  Cc: linux-kernel, llvm, linux-kbuild, Thomas Gleixner, Ingo Molnar,
	Borislav Petkov, Dave Hansen, Peter Zijlstra, x86,
	H . Peter Anvin


On Wed, 29 Apr 2026, at 04:59, Nathan Chancellor wrote:
> Now that the minimum supported version of LLVM for building the kernel
> has been raised to 17.0.1, the workaround added by
>
>   78c4374ef8b8 ("x86/module: Deal with GOT based stack cookie load on 
> Clang < 17")
>
> will never be included, as the final clause in the preprocessor
> conditional is always false. Revert the change to clean up the dead
> code.
>
> Signed-off-by: Nathan Chancellor <nathan@kernel.org>

Acked-by: Ard Biesheuvel <ardb@kernel.org>

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PATCH 06/14] arch/Kconfig: Remove tautological condition from AUTOFDO_CLANG
  2026-04-29  2:59 ` [PATCH 06/14] arch/Kconfig: Remove tautological condition from AUTOFDO_CLANG Nathan Chancellor
@ 2026-04-29 16:43   ` Rong Xu
  0 siblings, 0 replies; 27+ messages in thread
From: Rong Xu @ 2026-04-29 16:43 UTC (permalink / raw)
  To: Nathan Chancellor
  Cc: Nicolas Schier, Bill Wendling, Justin Stitt, Nick Desaulniers,
	linux-kernel, llvm, linux-kbuild, Han Shen

This looks good to me.

Reviewed-by: Rong Xu <xur@google.com>

-Rong

On Tue, Apr 28, 2026 at 8:00 PM Nathan Chancellor <nathan@kernel.org> wrote:
>
> Now that the minimum supported version of LLVM for building the kernel
> has been raised to 17.0.1, the clang version check in
> CONFIG_AUTOFDO_CLANG can be removed because it is always true.
>
> Signed-off-by: Nathan Chancellor <nathan@kernel.org>
> ---
> Cc: Rong Xu <xur@google.com>
> Cc: Han Shen <shenhan@google.com>
> ---
>  arch/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/Kconfig b/arch/Kconfig
> index 0d34bcafecaa..5d6e9f56210b 100644
> --- a/arch/Kconfig
> +++ b/arch/Kconfig
> @@ -866,7 +866,7 @@ config ARCH_SUPPORTS_AUTOFDO_CLANG
>  config AUTOFDO_CLANG
>         bool "Enable Clang's AutoFDO build (EXPERIMENTAL)"
>         depends on ARCH_SUPPORTS_AUTOFDO_CLANG
> -       depends on CC_IS_CLANG && CLANG_VERSION >= 170000
> +       depends on CC_IS_CLANG
>         help
>           This option enables Clang’s AutoFDO build. When
>           an AutoFDO profile is specified in variable
>
> --
> 2.54.0
>

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PATCH 11/14] x86/build: Drop unused '-ffreestanding' addition to KBUILD_CFLAGS
  2026-04-29  2:59 ` [PATCH 11/14] x86/build: Drop unused '-ffreestanding' addition to KBUILD_CFLAGS Nathan Chancellor
@ 2026-04-29 17:24   ` Nathan Chancellor
  0 siblings, 0 replies; 27+ messages in thread
From: Nathan Chancellor @ 2026-04-29 17:24 UTC (permalink / raw)
  To: Nicolas Schier, Bill Wendling, Justin Stitt, Nick Desaulniers
  Cc: linux-kernel, llvm, linux-kbuild, Thomas Gleixner, Ingo Molnar,
	Borislav Petkov, Dave Hansen, x86, H. Peter Anvin

On Tue, Apr 28, 2026 at 10:59:17PM -0400, Nathan Chancellor wrote:
> Now that the minimum supported version of LLVM for building the kernel
> has been raised to 17.0.1, the condition to add '-ffreestanding' to
> KBUILD_CFLAGS for 32-bit x86 is always false, so the if block can be
> removed.
> 
> Signed-off-by: Nathan Chancellor <nathan@kernel.org>
> ---
> Cc: Thomas Gleixner <tglx@kernel.org>
> Cc: Ingo Molnar <mingo@redhat.com>
> Cc: Borislav Petkov <bp@alien8.de>
> Cc: Dave Hansen <dave.hansen@linux.intel.com>
> Cc: x86@kernel.org
> Cc: H. Peter Anvin <hpa@zytor.com>
> ---
>  arch/x86/Makefile | 5 -----
>  1 file changed, 5 deletions(-)
> 
> diff --git a/arch/x86/Makefile b/arch/x86/Makefile
> index 46fec0b08487..5720f2470cfc 100644
> --- a/arch/x86/Makefile
> +++ b/arch/x86/Makefile
> @@ -124,11 +124,6 @@ ifeq ($(CONFIG_X86_32),y)
>          include $(srctree)/arch/x86/Makefile_32.cpu
>          KBUILD_CFLAGS += $(cflags-y)
>  
> -    ifneq ($(call clang-min-version, 160000),y)

Sashiko points out [1] that the condition of this block, added by

  d70da12453ac ("hardening: Enable i386 FORTIFY_SOURCE on Clang 16+")

results in GCC builds still having '-ffreestanding' enabled. I don't
think this should be a problem but if we want to be more conservative, I
could turn this into an

  ifdef CONFIG_CC_IS_GCC

block to keep the same behavior for GCC while avoiding the flag
altogether for clang. Regardless, the commit message will need
rewording.

[1]: https://sashiko.dev/#/patchset/14621?part=11

> -        # https://github.com/llvm/llvm-project/issues/53645
> -        KBUILD_CFLAGS += -ffreestanding
> -    endif
> -
>          percpu_seg := fs
>  else
>          BITS := 64
> 
> -- 
> 2.54.0
> 

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PATCH 01/14] kbuild: Bump minimum version of LLVM for building the kernel to 17.0.1
  2026-04-29  2:59 ` [PATCH 01/14] kbuild: " Nathan Chancellor
@ 2026-05-05 15:27   ` Nicolas Schier
  2026-05-05 18:26     ` Daniel Pereira
  0 siblings, 1 reply; 27+ messages in thread
From: Nicolas Schier @ 2026-05-05 15:27 UTC (permalink / raw)
  To: Nathan Chancellor
  Cc: Bill Wendling, Justin Stitt, Nick Desaulniers, linux-kernel, llvm,
	linux-kbuild, Jonathan Corbet, Shuah Khan, linux-doc

On Tue, Apr 28, 2026 at 10:59:07PM -0400, Nathan Chancellor wrote:
> The current minimum version of LLVM for building the kernel is 15.0.0.
> However, there are two deficiencies compared to GCC that were fixed in
> LLVM 17 that are starting to become more noticeable.
> 
> The first was a bug in LLVM's scope checker [1], where all labels in a
> function were validated as potential targets of an asm goto statement,
> even if they were not listed in the asm goto statement as targets. This
> becomes particularly problematic when the cleanup attribute is used, as
> 
>   asm goto(... : label_a);
>   ...
> label_a:
>   ...
>   int var __free(foo);
>   asm goto(... : label_b);
>   ...
> label_b:
>   ...
> 
> will trigger an error since the scope checker will complain that the
> cleanup variable would be skipped when jumping from the first asm goto
> to label_b (which obviously cannot happen). This issue was the catalyst
> for commit e2ffa15b9baa ("kbuild: Disable CC_HAS_ASM_GOTO_OUTPUT on
> clang < 17"). Unfortunately, this issue is reproducible with regular asm
> goto in addition to asm goto with outputs, so that change was not
> entirely sufficient to avoid the issue altogether. As asm goto has
> effectively been required since commit a0a12c3ed057 ("asm goto:
> eradicate CC_HAS_ASM_GOTO") and the usage of the cleanup attribute
> continues to grow across the tree, raising the minimum to a version that
> avoids this issue altogether is a better long term solution than
> attempting to workaround it at every spot where it happens.
> 
> The second issue is an incompatibility with GCC 8.1+ around variables
> marked with const being valid constant expressions for _Static_assert
> and other macros [2]. With GCC 8.1 being the minimum supported version
> since commit 118c40b7b503 ("kbuild: require gcc-8 and binutils-2.30"),
> this incompatibility becomes more of a maintenance burden since only
> clang-15 and clang-16 are affected by it.
> 
> Looking at the clang version of various major distributions through
> Docker images, no one should be left behind as a result of this bump, as
> the old ones cannot clear the current minimum of 15.0.0.
> 
>   archlinux:latest              clang version 22.1.3
>   debian:oldoldstable-slim      Debian clang version 11.0.1-2
>   debian:oldstable-slim         Debian clang version 14.0.6
>   debian:stable-slim            Debian clang version 19.1.7 (3+b1)
>   debian:testing-slim           Debian clang version 21.1.8 (3+b1)
>   debian:unstable-slim          Debian clang version 21.1.8 (7+b1)
>   fedora:42                     clang version 20.1.8 (Fedora 20.1.8-4.fc42)
>   fedora:latest                 clang version 21.1.8 (Fedora 21.1.8-4.fc43)
>   fedora:44                     clang version 22.1.1 (Fedora 22.1.1-2.fc44)
>   fedora:rawhide                clang version 22.1.3 (Fedora 22.1.3-1.fc45)
>   opensuse/leap:latest          clang version 17.0.6
>   opensuse/tumbleweed:latest    clang version 21.1.8
>   ubuntu:jammy                  Ubuntu clang version 14.0.0-1ubuntu1.1
>   ubuntu:noble                  Ubuntu clang version 18.1.3 (1ubuntu1)
>   ubuntu:questing               Ubuntu clang version 20.1.8 (0ubuntu4)
>   ubuntu:resolute               Ubuntu clang version 21.1.8 (6ubuntu1)
> 
> 17.0.1 is chosen as the minimum instead of 17.0.0 to ensure that the
> particular version of LLVM 17 has the two aforementioned bugs fixed, as
> the second was fixed during the 17.0.0 release candidate phase and it
> was not until LLVM 18 that LLVM adopted the scheme of x.0.0 being a
> prerelease version and x.1.0 is a release version [3] to help with
> scenarios such as this.
> 
> Link: https://github.com/llvm/llvm-project/commit/f023f5cdb2e6c19026f04a15b5a935c041835d14 [1]
> Link: https://github.com/llvm/llvm-project/commit/0b2d5b967d98375793897295d651f58f6fbd3034 [2]
> Link: https://github.com/llvm/llvm-project/commit/4532617ae420056bf32f6403dde07fb99d276a49 [3]
> Signed-off-by: Nathan Chancellor <nathan@kernel.org>
> ---
> Cc: Jonathan Corbet <corbet@lwn.net>
> Cc: Shuah Khan <skhan@linuxfoundation.org>
> Cc: linux-doc@vger.kernel.org
> ---
>  Documentation/process/changes.rst | 2 +-
>  scripts/min-tool-version.sh       | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/Documentation/process/changes.rst b/Documentation/process/changes.rst
> index 9a99037270ff..b9afce768446 100644
> --- a/Documentation/process/changes.rst
> +++ b/Documentation/process/changes.rst
> @@ -36,7 +36,7 @@ bindgen (optional)     0.71.1           bindgen --version
>  binutils               2.30             ld -v
>  bison                  2.0              bison --version
>  btrfs-progs            0.18             btrfs --version
> -Clang/LLVM (optional)  15.0.0           clang --version
> +Clang/LLVM (optional)  17.0.1           clang --version
>  e2fsprogs              1.41.4           e2fsck -V
>  flex                   2.5.35           flex --version
>  gdb                    7.2              gdb --version

FTR: The translations
Documentation/translations/{it_IT,pt_BR}/process/changes.rst become now
even more outdated.

Acked-by: Nicolas Schier <nsc@kernel.org>

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PATCH 02/14] security/Kconfig.hardening: Remove tautological condition from CC_HAS_ZERO_CALL_USED_REGS
  2026-04-29  2:59 ` [PATCH 02/14] security/Kconfig.hardening: Remove tautological condition from CC_HAS_ZERO_CALL_USED_REGS Nathan Chancellor
@ 2026-05-05 15:28   ` Nicolas Schier
  0 siblings, 0 replies; 27+ messages in thread
From: Nicolas Schier @ 2026-05-05 15:28 UTC (permalink / raw)
  To: Nathan Chancellor
  Cc: Bill Wendling, Justin Stitt, Nick Desaulniers, linux-kernel, llvm,
	linux-kbuild, Kees Cook, Gustavo A. R. Silva, linux-hardening,
	linux-security-module

On Tue, Apr 28, 2026 at 10:59:08PM -0400, Nathan Chancellor wrote:
> Now that the minimum supported version of LLVM for building the kernel
> has been raised to 17.0.1, the '!Clang || Clang > 15.0.6' dependency for
> CONFIG_CC_HAS_ZERO_CALL_USED_REGS is always true, so it can be removed.
> 
> Signed-off-by: Nathan Chancellor <nathan@kernel.org>
> ---
> Cc: Kees Cook <kees@kernel.org>
> Cc: Gustavo A. R. Silva <gustavoars@kernel.org>
> Cc: linux-hardening@vger.kernel.org
> Cc: linux-security-module@vger.kernel.org
> ---
>  security/Kconfig.hardening | 3 ---
>  1 file changed, 3 deletions(-)
> 

Reviewed-by: Nicolas Schier <nsc@kernel.org>

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PATCH 03/14] security/Kconfig.hardening: Remove tautological condition from FORTIFY_SOURCE
  2026-04-29  2:59 ` [PATCH 03/14] security/Kconfig.hardening: Remove tautological condition from FORTIFY_SOURCE Nathan Chancellor
@ 2026-05-05 15:28   ` Nicolas Schier
  0 siblings, 0 replies; 27+ messages in thread
From: Nicolas Schier @ 2026-05-05 15:28 UTC (permalink / raw)
  To: Nathan Chancellor
  Cc: Bill Wendling, Justin Stitt, Nick Desaulniers, linux-kernel, llvm,
	linux-kbuild, Kees Cook, Gustavo A. R. Silva, linux-hardening,
	linux-security-module

On Tue, Apr 28, 2026 at 10:59:09PM -0400, Nathan Chancellor wrote:
> Now that the minimum supported version of LLVM for building the kernel
> has been raised to 17.0.1, the '!X86_32 || !Clang || Clang > 16'
> dependency of CONFIG_FORTIFY_SOURCE is always true, so it can be
> removed.
> 
> Signed-off-by: Nathan Chancellor <nathan@kernel.org>
> ---
> Cc: Kees Cook <kees@kernel.org>
> Cc: Gustavo A. R. Silva <gustavoars@kernel.org>
> Cc: linux-hardening@vger.kernel.org
> Cc: linux-security-module@vger.kernel.org
> ---
>  security/Kconfig.hardening | 2 --
>  1 file changed, 2 deletions(-)
> 

Reviewed-by: Nicolas Schier <nsc@kernel.org>

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PATCH 04/14] security/Kconfig.hardening: Remove tautological condition from CC_HAS_RANDSTRUCT
  2026-04-29  2:59 ` [PATCH 04/14] security/Kconfig.hardening: Remove tautological condition from CC_HAS_RANDSTRUCT Nathan Chancellor
@ 2026-05-05 15:28   ` Nicolas Schier
  0 siblings, 0 replies; 27+ messages in thread
From: Nicolas Schier @ 2026-05-05 15:28 UTC (permalink / raw)
  To: Nathan Chancellor
  Cc: Bill Wendling, Justin Stitt, Nick Desaulniers, linux-kernel, llvm,
	linux-kbuild, Kees Cook, Gustavo A. R. Silva, linux-hardening,
	linux-security-module

On Tue, Apr 28, 2026 at 10:59:10PM -0400, Nathan Chancellor wrote:
> Now that the minimum supported version of LLVM for building the kernel
> has been raised to 17.0.1, the '!Clang || Clang >= 16' dependency for
> CONFIG_CC_HAS_RANDSTRUCT is always true, so it can be removed.
> 
> Signed-off-by: Nathan Chancellor <nathan@kernel.org>
> ---
> Cc: Kees Cook <kees@kernel.org>
> Cc: Gustavo A. R. Silva <gustavoars@kernel.org>
> Cc: linux-hardening@vger.kernel.org
> Cc: linux-security-module@vger.kernel.org
> ---
>  security/Kconfig.hardening | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/security/Kconfig.hardening b/security/Kconfig.hardening
> index e4f23c08a17a..b90cf9ed4642 100644
> --- a/security/Kconfig.hardening
> +++ b/security/Kconfig.hardening
> @@ -274,9 +274,6 @@ endmenu
>  
>  config CC_HAS_RANDSTRUCT
>  	def_bool $(cc-option,-frandomize-layout-seed-file=/dev/null)
> -	# Randstruct was first added in Clang 15, but it isn't safe to use until
> -	# Clang 16 due to https://github.com/llvm/llvm-project/issues/60349
> -	depends on !CC_IS_CLANG || CLANG_VERSION >= 160000
>  
>  choice
>  	prompt "Randomize layout of sensitive kernel structures"
> 

Reviewed-by: Nicolas Schier <nsc@kernel.org>

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PATCH 05/14] arch/Kconfig: Remove tautological conditions from HAS_LTO_CLANG
  2026-04-29  2:59 ` [PATCH 05/14] arch/Kconfig: Remove tautological conditions from HAS_LTO_CLANG Nathan Chancellor
@ 2026-05-05 15:30   ` Nicolas Schier
  0 siblings, 0 replies; 27+ messages in thread
From: Nicolas Schier @ 2026-05-05 15:30 UTC (permalink / raw)
  To: Nathan Chancellor
  Cc: Bill Wendling, Justin Stitt, Nick Desaulniers, linux-kernel, llvm,
	linux-kbuild

On Tue, Apr 28, 2026 at 10:59:11PM -0400, Nathan Chancellor wrote:
> Now that the minimum supported version of LLVM for building the kernel
> has been raised to 17.0.1, two dependency lines in CONFIG_HAS_LTO_CLANG
> are always true because Clang will always be newer than 17.0.0, so they
> can be removed.
> 
> Signed-off-by: Nathan Chancellor <nathan@kernel.org>
> ---
>  arch/Kconfig | 3 ---
>  1 file changed, 3 deletions(-)
> 

Reviewed-by: Nicolas Schier <nsc@kernel.org>

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PATCH 10/14] scripts/Makefile.warn: Drop -Wformat handling for clang < 16
  2026-04-29  2:59 ` [PATCH 10/14] scripts/Makefile.warn: Drop -Wformat handling for clang < 16 Nathan Chancellor
@ 2026-05-05 15:31   ` Nicolas Schier
  0 siblings, 0 replies; 27+ messages in thread
From: Nicolas Schier @ 2026-05-05 15:31 UTC (permalink / raw)
  To: Nathan Chancellor
  Cc: Bill Wendling, Justin Stitt, Nick Desaulniers, linux-kernel, llvm,
	linux-kbuild

On Tue, Apr 28, 2026 at 10:59:16PM -0400, Nathan Chancellor wrote:
> Now that the minimum supported version of LLVM for building the kernel
> has been raised to 17.0.1, the block dealing with -Wformat with clang
> prior to 16 can be removed since the condition for its inclusion is
> always false.
> 
> Signed-off-by: Nathan Chancellor <nathan@kernel.org>
> ---
>  scripts/Makefile.warn | 10 ----------
>  1 file changed, 10 deletions(-)
> 

Reviewed-by: Nicolas Schier <nsc@kernel.org>

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PATCH 14/14] kbuild: Remove check for broken scoping with clang < 17 in CC_HAS_ASM_GOTO_OUTPUT
  2026-04-29  2:59 ` [PATCH 14/14] kbuild: Remove check for broken scoping with clang < 17 in CC_HAS_ASM_GOTO_OUTPUT Nathan Chancellor
@ 2026-05-05 15:32   ` Nicolas Schier
  0 siblings, 0 replies; 27+ messages in thread
From: Nicolas Schier @ 2026-05-05 15:32 UTC (permalink / raw)
  To: Nathan Chancellor
  Cc: Bill Wendling, Justin Stitt, Nick Desaulniers, linux-kernel, llvm,
	linux-kbuild, Thomas Gleixner, Peter Zijlstra

On Tue, Apr 28, 2026 at 10:59:20PM -0400, Nathan Chancellor wrote:
> Now that the minimum supported version of LLVM for building the kernel
> has been raised to 17.0.1, the check added to CC_HAS_ASM_GOTO_OUTPUT by
> commit e2ffa15b9baa ("kbuild: Disable CC_HAS_ASM_GOTO_OUTPUT on clang <
> 17") can be removed, as the issue it detects is guaranteed to be fixed.
> 
> Signed-off-by: Nathan Chancellor <nathan@kernel.org>
> ---
> Cc: Thomas Gleixner <tglx@kernel.org>
> Cc: Peter Zijlstra <peterz@infradead.org>
> ---
>  init/Kconfig | 3 ---
>  1 file changed, 3 deletions(-)
> 

Acked-by: Nicolas Schier <nsc@kernel.org>

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PATCH 01/14] kbuild: Bump minimum version of LLVM for building the kernel to 17.0.1
  2026-05-05 15:27   ` Nicolas Schier
@ 2026-05-05 18:26     ` Daniel Pereira
  0 siblings, 0 replies; 27+ messages in thread
From: Daniel Pereira @ 2026-05-05 18:26 UTC (permalink / raw)
  To: Nathan Chancellor, Bill Wendling, Justin Stitt, Nick Desaulniers,
	linux-kernel, llvm, linux-kbuild, Jonathan Corbet, Shuah Khan,
	linux-doc

On Tue, May 5, 2026 at 1:11 PM Nicolas Schier <nsc@kernel.org> wrote:
>
>> FTR: The translations
>>Documentation/translations/{it\_IT,pt\_BR}/process/changes.rst become now
>>even more outdated.
>
>>Acked-by: Nicolas Schier <nsc@kernel.org>
>

Hi Nicolas,

Just confirming that I will make the necessary corrections to the
changes.rst Portuguese translation (pt\_BR) in the next few days.

Thanks,

Daniel Pereira
Linux Kernel Maintainer pt\_BR

^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2026-05-05 18:26 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-29  2:59 [PATCH 00/14] Bump minimum version of LLVM for building the kernel to 17.0.1 Nathan Chancellor
2026-04-29  2:59 ` [PATCH 01/14] kbuild: " Nathan Chancellor
2026-05-05 15:27   ` Nicolas Schier
2026-05-05 18:26     ` Daniel Pereira
2026-04-29  2:59 ` [PATCH 02/14] security/Kconfig.hardening: Remove tautological condition from CC_HAS_ZERO_CALL_USED_REGS Nathan Chancellor
2026-05-05 15:28   ` Nicolas Schier
2026-04-29  2:59 ` [PATCH 03/14] security/Kconfig.hardening: Remove tautological condition from FORTIFY_SOURCE Nathan Chancellor
2026-05-05 15:28   ` Nicolas Schier
2026-04-29  2:59 ` [PATCH 04/14] security/Kconfig.hardening: Remove tautological condition from CC_HAS_RANDSTRUCT Nathan Chancellor
2026-05-05 15:28   ` Nicolas Schier
2026-04-29  2:59 ` [PATCH 05/14] arch/Kconfig: Remove tautological conditions from HAS_LTO_CLANG Nathan Chancellor
2026-05-05 15:30   ` Nicolas Schier
2026-04-29  2:59 ` [PATCH 06/14] arch/Kconfig: Remove tautological condition from AUTOFDO_CLANG Nathan Chancellor
2026-04-29 16:43   ` Rong Xu
2026-04-29  2:59 ` [PATCH 07/14] ARM: Drop tautological ld.lld conditions from ARCH_MULTI_V4{,T} Nathan Chancellor
2026-04-29  2:59 ` [PATCH 08/14] riscv: Remove tautological condition from selection of ARCH_SUPPORTS_CFI Nathan Chancellor
2026-04-29  2:59 ` [PATCH 09/14] riscv: Drop tautological condition from TOOLCHAIN_NEEDS_OLD_ISA_SPEC Nathan Chancellor
2026-04-29  2:59 ` [PATCH 10/14] scripts/Makefile.warn: Drop -Wformat handling for clang < 16 Nathan Chancellor
2026-05-05 15:31   ` Nicolas Schier
2026-04-29  2:59 ` [PATCH 11/14] x86/build: Drop unused '-ffreestanding' addition to KBUILD_CFLAGS Nathan Chancellor
2026-04-29 17:24   ` Nathan Chancellor
2026-04-29  2:59 ` [PATCH 12/14] x86/module: Revert "Deal with GOT based stack cookie load on Clang < 17" Nathan Chancellor
2026-04-29  7:10   ` Ard Biesheuvel
2026-04-29  2:59 ` [PATCH 13/14] x86/entry/vdso32: Remove conditional omission of '.cfi_offset eflags' Nathan Chancellor
2026-04-29  3:15   ` H. Peter Anvin
2026-04-29  2:59 ` [PATCH 14/14] kbuild: Remove check for broken scoping with clang < 17 in CC_HAS_ASM_GOTO_OUTPUT Nathan Chancellor
2026-05-05 15:32   ` Nicolas Schier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox