* [PATCH 00/10] Bump minimum supported version of LLVM for building the kernel to 15.0.0
@ 2025-08-18 18:57 Nathan Chancellor
2025-08-18 18:57 ` [PATCH 07/10] riscv: Remove version check for LTO_CLANG selects Nathan Chancellor
2025-08-19 0:55 ` [PATCH 00/10] Bump minimum supported version of LLVM for building the kernel to 15.0.0 Kees Cook
0 siblings, 2 replies; 5+ messages in thread
From: Nathan Chancellor @ 2025-08-18 18:57 UTC (permalink / raw)
To: Andrew Morton
Cc: Arnd Bergmann, Kees Cook, Nick Desaulniers, Bill Wendling,
Justin Stitt, linux-kernel, llvm, patches, Nathan Chancellor,
linux-kbuild, linux-hardening, Russell King, Ard Biesheuvel,
linux-arm-kernel, Catalin Marinas, Will Deacon,
Thomas Bogendoerfer, linux-mips, Madhavan Srinivasan,
Michael Ellerman, Nicholas Piggin, Christophe Leroy, linuxppc-dev,
Palmer Dabbelt, Alexandre Ghiti, linux-riscv, Josh Poimboeuf,
Peter Zijlstra, Marco Elver, Dmitry Vyukov, kasan-dev,
Alexander Potapenko
s390 and x86 have required LLVM 15 since
30d17fac6aae ("scripts/min-tool-version.sh: raise minimum clang version to 15.0.0 for s390")
7861640aac52 ("x86/build: Raise the minimum LLVM version to 15.0.0")
respectively. This series bumps the rest of the kernel to 15.0.0 to
match, which allows for a decent number of clean ups.
On the distros front, we will only leave behind Debian Bookworm and
Ubuntu Jammy. In both of those cases, builders / developers can either
use the kernel.org toolchains or https://apt.llvm.org to get newer
versions that will run on those distributions, if they cannot upgrade.
archlinux:latest clang version 20.1.8
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 19.1.7 (3+b1)
debian:unstable-slim Debian clang version 19.1.7 (3+b2)
fedora:41 clang version 19.1.7 (Fedora 19.1.7-4.fc41)
fedora:latest clang version 20.1.8 (Fedora 20.1.8-3.fc42)
fedora:rawhide clang version 20.1.8 (Fedora 20.1.8-3.fc43)
opensuse/leap:latest clang version 17.0.6
opensuse/tumbleweed:latest clang version 20.1.8
ubuntu:focal clang version 10.0.0-4ubuntu1
ubuntu:jammy Ubuntu clang version 14.0.0-1ubuntu1.1
ubuntu:noble Ubuntu clang version 18.1.3 (1ubuntu1)
ubuntu:latest Ubuntu clang version 18.1.3 (1ubuntu1)
ubuntu:rolling Ubuntu clang version 20.1.2 (0ubuntu1)
ubuntu:devel Ubuntu clang version 20.1.8 (0ubuntu1)
I think it makes sense for either Andrew to carry this via -mm on a
nonmm branch or me to carry this via the Kbuild tree, with the
appropriate acks.
---
Nathan Chancellor (10):
kbuild: Bump minimum version of LLVM for building the kernel to 15.0.0
arch/Kconfig: Drop always true condition from RANDOMIZE_KSTACK_OFFSET
ARM: Clean up definition of ARM_HAS_GROUP_RELOCS
arm64: Remove tautological LLVM Kconfig conditions
mips: Unconditionally select ARCH_HAS_CURRENT_STACK_POINTER
powerpc: Drop unnecessary initializations in __copy_inst_from_kernel_nofault()
riscv: Remove version check for LTO_CLANG selects
lib/Kconfig.debug: Drop CLANG_VERSION check from DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT
objtool: Drop noinstr hack for KCSAN_WEAK_MEMORY
KMSAN: Remove tautological checks
Documentation/process/changes.rst | 2 +-
arch/Kconfig | 1 -
arch/arm/Kconfig | 11 ++++-------
arch/arm64/Kconfig | 5 +----
arch/mips/Kconfig | 2 +-
arch/powerpc/include/asm/inst.h | 4 ----
arch/riscv/Kconfig | 5 ++---
lib/Kconfig.debug | 2 +-
lib/Kconfig.kcsan | 6 ------
lib/Kconfig.kmsan | 11 +----------
scripts/min-tool-version.sh | 6 ++----
tools/objtool/check.c | 10 ----------
12 files changed, 13 insertions(+), 52 deletions(-)
---
base-commit: 8f5ae30d69d7543eee0d70083daf4de8fe15d585
change-id: 20250710-bump-min-llvm-ver-15-95231f1eb655
Best regards,
--
Nathan Chancellor <nathan@kernel.org>
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 07/10] riscv: Remove version check for LTO_CLANG selects
2025-08-18 18:57 [PATCH 00/10] Bump minimum supported version of LLVM for building the kernel to 15.0.0 Nathan Chancellor
@ 2025-08-18 18:57 ` Nathan Chancellor
2025-08-20 7:23 ` Alexandre Ghiti
2025-08-19 0:55 ` [PATCH 00/10] Bump minimum supported version of LLVM for building the kernel to 15.0.0 Kees Cook
1 sibling, 1 reply; 5+ messages in thread
From: Nathan Chancellor @ 2025-08-18 18:57 UTC (permalink / raw)
To: Andrew Morton
Cc: Arnd Bergmann, Kees Cook, Nick Desaulniers, Bill Wendling,
Justin Stitt, linux-kernel, llvm, patches, Nathan Chancellor,
Palmer Dabbelt, Alexandre Ghiti, linux-riscv
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.
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
---
Cc: Palmer Dabbelt <palmer@dabbelt.com>
Cc: Alexandre Ghiti <alex@ghiti.fr>
Cc: linux-riscv@lists.infradead.org
Small note, this will conflict with
https://lore.kernel.org/20250710-riscv-restrict-lto-to-medany-v1-1-b1dac9871ecf@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 >= 14: https://github.com/llvm/llvm-project/issues/50505
- select ARCH_SUPPORTS_LTO_CLANG if LLD_VERSION >= 140000
- select ARCH_SUPPORTS_LTO_CLANG_THIN if LLD_VERSION >= 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
--
2.50.1
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 00/10] Bump minimum supported version of LLVM for building the kernel to 15.0.0
2025-08-18 18:57 [PATCH 00/10] Bump minimum supported version of LLVM for building the kernel to 15.0.0 Nathan Chancellor
2025-08-18 18:57 ` [PATCH 07/10] riscv: Remove version check for LTO_CLANG selects Nathan Chancellor
@ 2025-08-19 0:55 ` Kees Cook
1 sibling, 0 replies; 5+ messages in thread
From: Kees Cook @ 2025-08-19 0:55 UTC (permalink / raw)
To: Nathan Chancellor
Cc: Andrew Morton, Arnd Bergmann, Nick Desaulniers, Bill Wendling,
Justin Stitt, linux-kernel, llvm, patches, linux-kbuild,
linux-hardening, Russell King, Ard Biesheuvel, linux-arm-kernel,
Catalin Marinas, Will Deacon, Thomas Bogendoerfer, linux-mips,
Madhavan Srinivasan, Michael Ellerman, Nicholas Piggin,
Christophe Leroy, linuxppc-dev, Palmer Dabbelt, Alexandre Ghiti,
linux-riscv, Josh Poimboeuf, Peter Zijlstra, Marco Elver,
Dmitry Vyukov, kasan-dev, Alexander Potapenko
On Mon, Aug 18, 2025 at 11:57:16AM -0700, Nathan Chancellor wrote:
> s390 and x86 have required LLVM 15 since
>
> 30d17fac6aae ("scripts/min-tool-version.sh: raise minimum clang version to 15.0.0 for s390")
> 7861640aac52 ("x86/build: Raise the minimum LLVM version to 15.0.0")
>
> respectively. This series bumps the rest of the kernel to 15.0.0 to
> match, which allows for a decent number of clean ups.
Looks good to me!
Reviewed-by: Kees Cook <kees@kernel.org>
> I think it makes sense for either Andrew to carry this via -mm on a
> nonmm branch or me to carry this via the Kbuild tree, with the
> appropriate acks.
I vote you carry it with Kbuild. :)
--
Kees Cook
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 07/10] riscv: Remove version check for LTO_CLANG selects
2025-08-18 18:57 ` [PATCH 07/10] riscv: Remove version check for LTO_CLANG selects Nathan Chancellor
@ 2025-08-20 7:23 ` Alexandre Ghiti
2025-08-20 16:11 ` Nathan Chancellor
0 siblings, 1 reply; 5+ messages in thread
From: Alexandre Ghiti @ 2025-08-20 7:23 UTC (permalink / raw)
To: Nathan Chancellor, Andrew Morton
Cc: Arnd Bergmann, Kees Cook, Nick Desaulniers, Bill Wendling,
Justin Stitt, linux-kernel, llvm, patches, Palmer Dabbelt,
linux-riscv
Hi Nathan,
On 8/18/25 20:57, Nathan Chancellor wrote:
> 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.
>
> Signed-off-by: Nathan Chancellor <nathan@kernel.org>
> ---
> Cc: Palmer Dabbelt <palmer@dabbelt.com>
> Cc: Alexandre Ghiti <alex@ghiti.fr>
> Cc: linux-riscv@lists.infradead.org
>
> Small note, this will conflict with
> https://lore.kernel.org/20250710-riscv-restrict-lto-to-medany-v1-1-b1dac9871ecf@kernel.org/
> but I think it is simple enough to deal with.
FYI, I'll send this patch for some 6.17-rcX.
> ---
> 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 >= 14: https://github.com/llvm/llvm-project/issues/50505
> - select ARCH_SUPPORTS_LTO_CLANG if LLD_VERSION >= 140000
> - select ARCH_SUPPORTS_LTO_CLANG_THIN if LLD_VERSION >= 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
>
I found another bunch of LLD_VERSION check in this file that could be
removed:
https://elixir.bootlin.com/linux/v6.17-rc2/source/arch/riscv/Kconfig#L253
https://elixir.bootlin.com/linux/v6.17-rc2/source/arch/riscv/Kconfig#L262
https://elixir.bootlin.com/linux/v6.17-rc2/source/arch/riscv/Kconfig#L630
https://elixir.bootlin.com/linux/v6.17-rc2/source/arch/riscv/Kconfig#L731
https://elixir.bootlin.com/linux/v6.17-rc2/source/arch/riscv/Kconfig#L746
https://elixir.bootlin.com/linux/v6.17-rc2/source/arch/riscv/Kconfig#L781
https://elixir.bootlin.com/linux/v6.17-rc2/source/arch/riscv/Kconfig#L804
Thanks,
Alex
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 07/10] riscv: Remove version check for LTO_CLANG selects
2025-08-20 7:23 ` Alexandre Ghiti
@ 2025-08-20 16:11 ` Nathan Chancellor
0 siblings, 0 replies; 5+ messages in thread
From: Nathan Chancellor @ 2025-08-20 16:11 UTC (permalink / raw)
To: Alexandre Ghiti
Cc: Andrew Morton, Arnd Bergmann, Kees Cook, Nick Desaulniers,
Bill Wendling, Justin Stitt, linux-kernel, llvm, patches,
Palmer Dabbelt, linux-riscv
On Wed, Aug 20, 2025 at 09:23:08AM +0200, Alexandre Ghiti wrote:
> Hi Nathan,
>
> On 8/18/25 20:57, Nathan Chancellor wrote:
> > 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.
> >
> > Signed-off-by: Nathan Chancellor <nathan@kernel.org>
> > ---
> > Cc: Palmer Dabbelt <palmer@dabbelt.com>
> > Cc: Alexandre Ghiti <alex@ghiti.fr>
> > Cc: linux-riscv@lists.infradead.org
> >
> > Small note, this will conflict with
> > https://lore.kernel.org/20250710-riscv-restrict-lto-to-medany-v1-1-b1dac9871ecf@kernel.org/
> > but I think it is simple enough to deal with.
>
> FYI, I'll send this patch for some 6.17-rcX.
Thanks, that would help.
> I found another bunch of LLD_VERSION check in this file that could be
> removed:
Huh, I am very surprised that I missed those :/ thanks a lot for
catching that!
> https://elixir.bootlin.com/linux/v6.17-rc2/source/arch/riscv/Kconfig#L253
I have added a patch removing CONFIG_RISCV_USE_LINKER_RELAXATION.
> https://elixir.bootlin.com/linux/v6.17-rc2/source/arch/riscv/Kconfig#L262
I don't think this one can be currently cleaned up since it won't always
be either true or false.
> https://elixir.bootlin.com/linux/v6.17-rc2/source/arch/riscv/Kconfig#L630
> https://elixir.bootlin.com/linux/v6.17-rc2/source/arch/riscv/Kconfig#L731
> https://elixir.bootlin.com/linux/v6.17-rc2/source/arch/riscv/Kconfig#L746
> https://elixir.bootlin.com/linux/v6.17-rc2/source/arch/riscv/Kconfig#L781
> https://elixir.bootlin.com/linux/v6.17-rc2/source/arch/riscv/Kconfig#L804
I have added a patch converting those version checks to just LD_IS_LLD.
Cheers,
Nathan
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-08-20 20:50 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-18 18:57 [PATCH 00/10] Bump minimum supported version of LLVM for building the kernel to 15.0.0 Nathan Chancellor
2025-08-18 18:57 ` [PATCH 07/10] riscv: Remove version check for LTO_CLANG selects Nathan Chancellor
2025-08-20 7:23 ` Alexandre Ghiti
2025-08-20 16:11 ` Nathan Chancellor
2025-08-19 0:55 ` [PATCH 00/10] Bump minimum supported version of LLVM for building the kernel to 15.0.0 Kees Cook
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).