linux/arch/alpha/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
audit.c audit: add support for the openat2 syscall 2021-10-01 16:52:48 -04:00
bugs.c alpha: missing includes 2024-05-03 22:09:30 +02:00
console.c alpha: missing includes 2024-05-03 22:09:30 +02:00
core_cia.c mm/memblock: add memblock_alloc_or_panic interface 2025-01-25 20:22:38 -08:00
core_irongate.c alpha: missing includes 2024-05-03 22:09:30 +02:00
core_marvel.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
core_mcpcia.c memblock: stop using implicit alignment to SMP_CACHE_BYTES 2018-10-31 08:54:16 -07:00
core_polaris.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
core_t2.c alpha: jensen, t2 - make __EXTERN_INLINE same as for the rest 2024-05-03 22:09:37 +02:00
core_titan.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
core_tsunami.c memblock: stop using implicit alignment to SMP_CACHE_BYTES 2018-10-31 08:54:16 -07:00
core_wildfire.c alpha: don't make functions public without a reason 2024-05-03 22:09:21 +02:00
entry.S alpha: align stack for page fault and user unaligned trap handlers 2025-02-14 14:06:04 -05:00
err_common.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
err_ev6.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
err_ev7.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
err_impl.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
err_marvel.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
err_titan.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
es1888.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
gct.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
head.S License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
io.c alpha: sort scr_mem{cpy,move}w() out 2024-05-03 22:08:50 +02:00
irq.c alpha: missing includes 2024-05-03 22:09:30 +02:00
irq_alpha.c alpha: Replace setup_irq() by request_irq() 2020-03-29 21:03:41 +02:00
irq_i8259.c alpha: remove LCA and APECS based machines 2024-05-03 22:09:59 +02:00
irq_impl.h alpha: Replace setup_irq() by request_irq() 2020-03-29 21:03:41 +02:00
irq_pyxis.c alpha: Replace setup_irq() by request_irq() 2020-03-29 21:03:41 +02:00
irq_srm.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
machvec_impl.h alpha: drop pre-EV56 support 2024-05-06 12:05:00 +02:00
Makefile arch: use always-$(KBUILD_BUILTIN) for vmlinux.lds 2025-06-07 14:38:07 +09:00
module.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
osf_sys.c alpha: switch osf_mount() to strndup_user() 2026-01-16 12:52:04 -05:00
pc873xx.c alpha: eliminate old-style function definitions 2021-05-06 19:24:11 -07:00
pc873xx.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
pci-sysfs.c sysfs: treewide: constify attribute callback of bin_attribute::mmap() 2024-11-05 14:00:28 +01:00
pci.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
pci_impl.h alpha: remove LCA and APECS based machines 2024-05-03 22:09:59 +02:00
pci_iommu.c alpha: Convert mapping routine to rely on physical address 2025-10-29 10:27:30 +01:00
perf_event.c alpha/perf: Remove driver-specific throttle support 2025-05-21 13:57:45 +02:00
process.c arch: copy_thread: pass clone_flags as u64 2025-09-01 15:31:34 +02:00
proto.h alpha: remove LCA and APECS based machines 2024-05-03 22:09:59 +02:00
ptrace.c alpha: lazy FPU switching 2023-02-24 23:14:22 -05:00
rtc.c rtc: Add support for configuring the UIP timeout for RTC reads 2023-12-17 22:33:55 +01:00
setup.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
signal.c alpha: lazy FPU switching 2023-02-24 23:14:22 -05:00
smc37c93x.c alpha: missing includes 2024-05-03 22:09:30 +02:00
smc37c669.c alpha: missing includes 2024-05-03 22:09:30 +02:00
smp.c alpha: missing includes 2024-05-03 22:09:30 +02:00
srm_env.c proc: remove PDE_DATA() completely 2022-01-22 08:33:37 +02:00
srmcons.c treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
sys_alcor.c mm: don't include asm/pgtable.h if linux/mm.h is already included 2020-06-09 09:39:13 -07:00
sys_cabriolet.c alpha: cabriolet: remove EV5 CPU support 2024-05-03 22:10:03 +02:00
sys_dp264.c mm: don't include asm/pgtable.h if linux/mm.h is already included 2020-06-09 09:39:13 -07:00
sys_eiger.c alpha: remove unneeded semicolon in sys_eiger.c 2020-06-12 17:43:17 -07:00
sys_marvel.c alpha: remove DISCONTIGMEM and NUMA 2021-06-29 10:53:55 -07:00
sys_miata.c alpha: Streamline convoluted PCI error handling 2023-10-10 16:26:56 -05:00
sys_mikasa.c alpha: remove LCA and APECS based machines 2024-05-03 22:09:59 +02:00
sys_nautilus.c alpha: missing includes 2024-05-03 22:09:30 +02:00
sys_noritake.c alpha: remove LCA and APECS based machines 2024-05-03 22:09:59 +02:00
sys_rawhide.c mm: don't include asm/pgtable.h if linux/mm.h is already included 2020-06-09 09:39:13 -07:00
sys_ruffian.c mm: don't include asm/pgtable.h if linux/mm.h is already included 2020-06-09 09:39:13 -07:00
sys_rx164.c mm: don't include asm/pgtable.h if linux/mm.h is already included 2020-06-09 09:39:13 -07:00
sys_sable.c alpha: sable: remove early machine support 2024-05-03 22:09:55 +02:00
sys_sx164.c mm: don't include asm/pgtable.h if linux/mm.h is already included 2020-06-09 09:39:13 -07:00
sys_takara.c mm: don't include asm/pgtable.h if linux/mm.h is already included 2020-06-09 09:39:13 -07:00
sys_titan.c mm: don't include asm/pgtable.h if linux/mm.h is already included 2020-06-09 09:39:13 -07:00
sys_wildfire.c alpha: remove DISCONTIGMEM and NUMA 2021-06-29 10:53:55 -07:00
systbls.S alpha: syscalls: switch to generic syscalltbl.sh 2021-04-25 05:25:22 +09:00
termios.c termios: start unifying non-UAPI parts of asm/termios.h 2022-09-09 10:44:34 +02:00
time.c alpha: Replace setup_irq() by request_irq() 2020-03-29 21:03:41 +02:00
traps.c alpha: align stack for page fault and user unaligned trap handlers 2025-02-14 14:06:04 -05:00
vmlinux.lds.S kbuild: Split .modinfo out from ELF_DETAILS 2026-02-26 11:50:19 -07:00