Skip to content

Commit 7f70725

Browse files
committed
Merge tag 'kbuild-6.18-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kbuild/linux
Pull Kbuild updates from Nathan Chancellor: - Extend modules.builtin.modinfo to include module aliases from MODULE_DEVICE_TABLE for builtin modules so that userspace tools (such as kmod) can verify that a particular module alias will be handled by a builtin module - Bump the minimum version of LLVM for building the kernel to 15.0.0 - Upgrade several userspace API checks in headers_check.pl to errors - Unify and consolidate CONFIG_WERROR / W=e handling - Turn assembler and linker warnings into errors with CONFIG_WERROR / W=e - Respect CONFIG_WERROR / W=e when building userspace programs (userprogs) - Enable -Werror unconditionally when building host programs (hostprogs) - Support copy_file_range() and data segment alignment in gen_init_cpio to improve performance on filesystems that support reflinks such as btrfs and XFS - Miscellaneous small changes to scripts and configuration files * tag 'kbuild-6.18-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kbuild/linux: (47 commits) modpost: Initialize builtin_modname to stop SIGSEGVs Documentation: kbuild: note CONFIG_DEBUG_EFI in reproducible builds kbuild: vmlinux.unstripped should always depend on .vmlinux.export.o modpost: Create modalias for builtin modules modpost: Add modname to mod_device_table alias scsi: Always define blogic_pci_tbl structure kbuild: extract modules.builtin.modinfo from vmlinux.unstripped kbuild: keep .modinfo section in vmlinux.unstripped kbuild: always create intermediate vmlinux.unstripped s390: vmlinux.lds.S: Reorder sections KMSAN: Remove tautological checks objtool: Drop noinstr hack for KCSAN_WEAK_MEMORY lib/Kconfig.debug: Drop CLANG_VERSION check from DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT riscv: Remove ld.lld version checks from many TOOLCHAIN_HAS configs riscv: Unconditionally use linker relaxation riscv: Remove version check for LTO_CLANG selects powerpc: Drop unnecessary initializations in __copy_inst_from_kernel_nofault() mips: Unconditionally select ARCH_HAS_CURRENT_STACK_POINTER arm64: Remove tautological LLVM Kconfig conditions ARM: Clean up definition of ARM_HAS_GROUP_RELOCS ...
2 parents c0f53f0 + 2ea77fc commit 7f70725

File tree

40 files changed

+433
-260
lines changed

40 files changed

+433
-260
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ x509.genkey
176176
*.kdev4
177177

178178
# Clang's compilation database file
179-
/compile_commands.json
179+
compile_commands.json
180180

181181
# Documentation toolchain
182182
sphinx_*/

Documentation/driver-api/early-userspace/buffer-format.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,11 @@ c_mtime is ignored unless CONFIG_INITRAMFS_PRESERVE_MTIME=y is set.
8686
The c_filesize should be zero for any file which is not a regular file
8787
or symlink.
8888

89+
c_namesize may account for more than one trailing '\0', as long as the
90+
value doesn't exceed PATH_MAX. This can be useful for ensuring that a
91+
subsequent file data segment is aligned, e.g. to a filesystem block
92+
boundary.
93+
8994
The c_chksum field contains a simple 32-bit unsigned sum of all the
9095
bytes in the data field. cpio(1) refers to this as "crc", which is
9196
clearly incorrect (a cyclic redundancy check is a different and

Documentation/kbuild/reproducible-builds.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ supported.
6161
The Reproducible Builds web site has more information about these
6262
`prefix-map options`_.
6363

64+
Some CONFIG options such as `CONFIG_DEBUG_EFI` embed absolute paths in
65+
object files. Such options should be disabled.
66+
6467
Generated files in source packages
6568
----------------------------------
6669

Documentation/process/changes.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ you probably needn't concern yourself with pcmciautils.
3030
Program Minimal version Command to check the version
3131
====================== =============== ========================================
3232
GNU C 8.1 gcc --version
33-
Clang/LLVM (optional) 13.0.1 clang --version
33+
Clang/LLVM (optional) 15.0.0 clang --version
3434
Rust (optional) 1.78.0 rustc --version
3535
bindgen (optional) 0.65.1 bindgen --version
3636
GNU make 4.0 make --version

Makefile

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -901,9 +901,6 @@ stackp-flags-$(CONFIG_STACKPROTECTOR_STRONG) := -fstack-protector-strong
901901

902902
KBUILD_CFLAGS += $(stackp-flags-y)
903903

904-
KBUILD_RUSTFLAGS-$(CONFIG_WERROR) += -Dwarnings
905-
KBUILD_RUSTFLAGS += $(KBUILD_RUSTFLAGS-y)
906-
907904
ifdef CONFIG_FRAME_POINTER
908905
KBUILD_CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls
909906
KBUILD_RUSTFLAGS += -Cforce-frame-pointers=y
@@ -1138,8 +1135,9 @@ LDFLAGS_vmlinux += --emit-relocs --discard-none
11381135
endif
11391136

11401137
# Align the bit size of userspace programs with the kernel
1141-
KBUILD_USERCFLAGS += $(filter -m32 -m64 --target=%, $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS))
1142-
KBUILD_USERLDFLAGS += $(filter -m32 -m64 --target=%, $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS))
1138+
USERFLAGS_FROM_KERNEL := -m32 -m64 --target=%
1139+
KBUILD_USERCFLAGS += $(filter $(USERFLAGS_FROM_KERNEL), $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS))
1140+
KBUILD_USERLDFLAGS += $(filter $(USERFLAGS_FROM_KERNEL), $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS))
11431141

11441142
# userspace programs are linked via the compiler, use the correct linker
11451143
ifdef CONFIG_CC_IS_CLANG

arch/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1523,7 +1523,6 @@ config RANDOMIZE_KSTACK_OFFSET
15231523
bool "Support for randomizing kernel stack offset on syscall entry" if EXPERT
15241524
default y
15251525
depends on HAVE_ARCH_RANDOMIZE_KSTACK_OFFSET
1526-
depends on INIT_STACK_NONE || !CC_IS_CLANG || CLANG_VERSION >= 140000
15271526
help
15281527
The kernel stack offset can be randomized (after pt_regs) by
15291528
roughly 5 bits of entropy, frustrating memory corruption

arch/arm/Kconfig

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -166,15 +166,12 @@ config ARM
166166
<http://www.arm.linux.org.uk/>.
167167

168168
config ARM_HAS_GROUP_RELOCS
169-
def_bool y
170-
depends on !LD_IS_LLD || LLD_VERSION >= 140000
171-
depends on !COMPILE_TEST
169+
def_bool !COMPILE_TEST
172170
help
173171
Whether or not to use R_ARM_ALU_PC_Gn or R_ARM_LDR_PC_Gn group
174-
relocations, which have been around for a long time, but were not
175-
supported in LLD until version 14. The combined range is -/+ 256 MiB,
176-
which is usually sufficient, but not for allyesconfig, so we disable
177-
this feature when doing compile testing.
172+
relocations. The combined range is -/+ 256 MiB, which is usually
173+
sufficient, but not for allyesconfig, so we disable this feature
174+
when doing compile testing.
178175

179176
config ARM_DMA_USE_IOMMU
180177
bool

arch/arm64/Kconfig

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1495,8 +1495,7 @@ choice
14951495

14961496
config CPU_BIG_ENDIAN
14971497
bool "Build big-endian kernel"
1498-
# https://github.com/llvm/llvm-project/commit/1379b150991f70a5782e9a143c2ba5308da1161c
1499-
depends on (AS_IS_GNU || AS_VERSION >= 150000) && BROKEN
1498+
depends on BROKEN
15001499
help
15011500
Say Y if you plan on running a kernel with a big-endian userspace.
15021501

@@ -2327,8 +2326,7 @@ config STACKPROTECTOR_PER_TASK
23272326

23282327
config UNWIND_PATCH_PAC_INTO_SCS
23292328
bool "Enable shadow call stack dynamically using code patching"
2330-
# needs Clang with https://github.com/llvm/llvm-project/commit/de07cde67b5d205d58690be012106022aea6d2b3 incorporated
2331-
depends on CC_IS_CLANG && CLANG_VERSION >= 150000
2329+
depends on CC_IS_CLANG
23322330
depends on ARM64_PTR_AUTH_KERNEL && CC_HAS_BRANCH_PROT_PAC_RET
23332331
depends on SHADOW_CALL_STACK
23342332
select UNWIND_TABLES

arch/mips/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ config MIPS
66
select ARCH_BINFMT_ELF_STATE if MIPS_FP_SUPPORT
77
select ARCH_HAS_CPU_CACHE_ALIASING
88
select ARCH_HAS_CPU_FINALIZE_INIT
9-
select ARCH_HAS_CURRENT_STACK_POINTER if !CC_IS_CLANG || CLANG_VERSION >= 140000
9+
select ARCH_HAS_CURRENT_STACK_POINTER
1010
select ARCH_HAS_DEBUG_VIRTUAL if !64BIT
1111
select ARCH_HAS_DMA_OPS if MACH_JAZZ
1212
select ARCH_HAS_FORTIFY_SOURCE

arch/powerpc/include/asm/inst.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -143,10 +143,6 @@ static inline int __copy_inst_from_kernel_nofault(ppc_inst_t *inst, u32 *src)
143143
{
144144
unsigned int val, suffix;
145145

146-
/* See https://github.com/ClangBuiltLinux/linux/issues/1521 */
147-
#if defined(CONFIG_CC_IS_CLANG) && CONFIG_CLANG_VERSION < 140000
148-
val = suffix = 0;
149-
#endif
150146
__get_kernel_nofault(&val, src, u32, Efault);
151147
if (IS_ENABLED(CONFIG_PPC64) && get_op(val) == OP_PREFIX) {
152148
__get_kernel_nofault(&suffix, src + 1, u32, Efault);

0 commit comments

Comments
 (0)