linux/arch/m68k
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
..
68000 m68knommu: Replace deprecated strcpy with strscpy in init_ucsimm 2026-01-27 12:38:52 +10:00
amiga Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
apollo m68k: remove unneeded tty includes 2025-06-17 13:42:33 +02:00
atari Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
bvme6000 m68k: Replace GPL 2.0+ README.legal boilerplate with SPDX 2023-10-06 10:03:04 +02:00
coldfire m68k: coldfire: remove creating a fixed phy 2025-11-04 18:46:13 -08:00
configs m68knommu: updates and fixes for v7.0 2026-02-15 19:45:00 -08:00
emu Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
fpsp040 m68k: fpsp040: Fix indentation by 5 spaces 2023-10-16 14:30:40 +02:00
hp300 serial: 8250: Move hp300_setup_serial_console() to <linux/serial_8250.h> 2024-01-27 19:01:39 -08:00
ifpsp060 m68k: Replace GPL 2.0+ README.legal boilerplate with SPDX 2023-10-06 10:03:04 +02:00
include treewide: provide a generic clear_user_page() variant 2026-01-20 19:24:39 -08:00
kernel kbuild: Split .modinfo out from ELF_DETAILS 2026-02-26 11:50:19 -07:00
lib m68k: nommu: fix memmove() with differently aligned src and dest for 68000 2026-01-27 12:38:52 +10:00
mac m68k updates for v6.17 2025-07-29 20:19:47 -07:00
math-emu m68k: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers 2025-07-06 12:50:50 +02:00
mm Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
mvme16x m68k: mvme147, mvme16x: Adopt rtc-m48t59 platform driver 2024-11-22 20:59:40 +01:00
mvme147 RTC for 6.13 2024-11-30 11:18:16 -08:00
q40 m68k: remove unneeded tty includes 2025-06-17 13:42:33 +02:00
sun3 m68k: sun3: Replace vsprintf() with bounded vsnprintf() 2026-01-26 12:26:01 +01:00
sun3x m68k: sun3/3x: Add and use "sun3.h" 2023-10-06 10:03:04 +02:00
tools/amiga m68k: tools: Replace zero-length array with flexible-array member 2020-05-25 10:55:56 +02:00
virt m68k: Rework BI_VIRT_RNG_SEED as BI_RNG_SEED 2022-09-28 22:16:44 +02:00
install.sh kbuild: Abort make on install failures 2024-07-20 13:34:54 +09:00
Kbuild m68k: Introduce a virtual m68k machine 2022-04-11 11:48:01 +02:00
Kconfig m68k: Enable dead code elimination 2025-07-06 12:50:50 +02:00
Kconfig.bus m68k: coldfire: drop ISA_DMA_API support 2022-05-16 13:18:30 +10:00
Kconfig.cpu m68k: Select M68020 as fallback for classic 2024-11-06 15:10:14 +01:00
Kconfig.debug m68k: Don't unregister boot console needlessly 2025-07-06 12:50:50 +02:00
Kconfig.devices m68k: /proc/hardware should depend on PROC_FS 2023-02-13 11:34:49 +01:00
Kconfig.machine m68k: Move Sun 3 into a top-level platform option 2024-11-06 15:10:14 +01:00
Makefile kbuild: use 4-space indentation when followed by conditionals 2024-02-15 06:05:44 +09:00