linux/arch/m68k/kernel
Nathan Chancellor 8678591b47
kbuild: Split .modinfo out from ELF_DETAILS
Commit 3e86e4d74c ("kbuild: keep .modinfo section in
vmlinux.unstripped") added .modinfo to ELF_DETAILS while removing it
from COMMON_DISCARDS, as it was needed in vmlinux.unstripped and
ELF_DETAILS was present in all architecture specific vmlinux linker
scripts. While this shuffle is fine for vmlinux, ELF_DETAILS and
COMMON_DISCARDS may be used by other linker scripts, such as the s390
and x86 compressed boot images, which may not expect to have a .modinfo
section. In certain circumstances, this could result in a bootloader
failing to load the compressed kernel [1].

Commit ddc6cbef3e ("s390/boot/vmlinux.lds.S: Ensure bzImage ends with
SecureBoot trailer") recently addressed this for the s390 bzImage but
the same bug remains for arm, parisc, and x86. The presence of .modinfo
in the x86 bzImage was the root cause of the issue worked around with
commit d50f210913 ("kbuild: align modinfo section for Secureboot
Authenticode EDK2 compat"). misc.c in arch/x86/boot/compressed includes
lib/decompress_unzstd.c, which in turn includes lib/xxhash.c and its
MODULE_LICENSE / MODULE_DESCRIPTION macros due to the STATIC definition.

Split .modinfo out from ELF_DETAILS into its own macro and handle it in
all vmlinux linker scripts. Discard .modinfo in the places where it was
previously being discarded from being in COMMON_DISCARDS, as it has
never been necessary in those uses.

Cc: stable@vger.kernel.org
Fixes: 3e86e4d74c ("kbuild: keep .modinfo section in vmlinux.unstripped")
Reported-by: Ed W <lists@wildgooses.com>
Closes: https://lore.kernel.org/587f25e0-a80e-46a5-9f01-87cb40cfa377@wildgooses.com/ [1]
Tested-by: Ed W <lists@wildgooses.com> # x86_64
Link: https://patch.msgid.link/20260225-separate-modinfo-from-elf-details-v1-1-387ced6baf4b@kernel.org
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
2026-02-26 11:50:19 -07:00
..
syscalls rseq: Implement sys_rseq_slice_yield() 2026-01-22 11:11:17 +01:00
.gitignore .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
asm-offsets.c arch: Add the macro COMPILE_OFFSETS to all the asm-offsets.c 2025-09-25 09:57:15 +02:00
bootinfo_proc.c proc: convert everything to "struct proc_ops" 2020-02-04 03:05:26 +00:00
dma.c m68k: remove unused includes from dma.c 2023-10-22 16:38:55 +02:00
early_printk.c m68k: Don't unregister boot console needlessly 2025-07-06 12:50:50 +02:00
entry.S m68k: Fix spinlock race in kernel thread creation 2024-05-08 17:43:22 +02:00
head.S m68k: Don't unregister boot console needlessly 2025-07-06 12:50:50 +02:00
ints.c m68k: kernel: Add and use "ints.h" 2023-10-06 10:03:01 +02:00
ints.h m68k: kernel: Add and use "ints.h" 2023-10-06 10:03:01 +02:00
irq.c Disintegrate asm/system.h for M68K 2012-03-28 18:30:02 +01:00
machine_kexec.c m68k: kexec: Include <linux/reboot.h> 2023-04-21 09:53:54 +02:00
Makefile arch: use always-$(KBUILD_BUILTIN) for vmlinux.lds 2025-06-07 14:38:07 +09:00
module.c m68k/kernel: Modernize printing of kernel messages 2017-02-12 10:36:52 +01:00
pcibios.c m68k/PCI: Use pci_enable_resources() in pcibios_enable_device() 2025-09-16 11:18:33 -05:00
process.c arch: copy_thread: pass clone_flags as u64 2025-09-01 15:31:34 +02:00
process.h m68k: kernel: Add and use "process.h" 2023-10-06 10:03:01 +02:00
ptrace.c m68k: ptrace: Use USER_REGSET_NOTE_TYPE() to specify regset note names 2025-07-14 22:27:47 -07:00
ptrace.h m68k: kernel: Add and use "ptrace.h" 2023-10-06 10:03:01 +02:00
relocate_kernel.S m68k: Fix invalid .section syntax 2023-07-24 14:50:02 +02:00
setup.c m68k: pull mach_beep in setup.c 2017-11-06 08:25:21 +10:00
setup_mm.c m68k: Replace strcpy() with strscpy() in hardware_proc_show() 2025-04-28 22:16:52 +02:00
setup_no.c m68k: Replace memcpy() + manual NUL-termination with strscpy() 2025-05-19 08:54:30 +10:00
signal.c m68k: kernel: Add and use "signal.h" 2023-10-06 10:03:01 +02:00
signal.h m68k: kernel: Add and use "signal.h" 2023-10-06 10:03:01 +02:00
sun3-head.S m68k/sun3: Remove is_medusa and m68k_pgtable_cachemode 2018-08-31 09:30:42 +02:00
sys_m68k.c m68k: mm: Add and use "fault.h" 2023-10-06 10:03:02 +02:00
syscalltable.S m68k: syscalls: switch to generic syscalltbl.sh 2021-04-06 09:33:20 +02:00
time.c m68k: Move Sun 3 into a top-level platform option 2024-11-06 15:10:14 +01:00
traps.c m68k: kernel: Use str_read_write() helper function 2024-11-06 15:10:14 +01:00
traps.h m68k: kernel: Add and use "traps.h" 2023-10-06 10:03:01 +02:00
uboot.c m68k/kernel: replace strncpy() with strscpy() 2025-05-19 08:54:30 +10:00
vectors.c m68k: kernel: Add and use "vectors.h" 2023-10-06 10:03:01 +02:00
vectors.h m68k: kernel: Add and use "vectors.h" 2023-10-06 10:03:01 +02:00
vmlinux-nommu.lds kbuild: Split .modinfo out from ELF_DETAILS 2026-02-26 11:50:19 -07:00
vmlinux-std.lds kbuild: Split .modinfo out from ELF_DETAILS 2026-02-26 11:50:19 -07:00
vmlinux-sun3.lds kbuild: Split .modinfo out from ELF_DETAILS 2026-02-26 11:50:19 -07:00
vmlinux.lds.S License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00