All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kbuild: Split .modinfo out from ELF_DETAILS
@ 2026-02-25 22:02 ` Nathan Chancellor
  0 siblings, 0 replies; 9+ messages in thread
From: Nathan Chancellor @ 2026-02-25 22:02 UTC (permalink / raw)
  To: Nathan Chancellor, Nicolas Schier
  Cc: Richard Henderson, Matt Turner, Magnus Lindholm, Vineet Gupta,
	Catalin Marinas, Will Deacon, Guo Ren, Brian Cain, Huacai Chen,
	WANG Xuerui, Geert Uytterhoeven, Sam Creasey, Thomas Bogendoerfer,
	Dinh Nguyen, Jonas Bonn, Stefan Kristiansson, Stafford Horne,
	James E.J. Bottomley, Helge Deller, Madhavan Srinivasan,
	Michael Ellerman, Nicholas Piggin, Christophe Leroy (CS GROUP),
	Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti,
	Heiko Carstens, Vasily Gorbik, Alexander Gordeev,
	Christian Borntraeger, Sven Schnelle, Yoshinori Sato, Rich Felker,
	John Paul Adrian Glaubitz, David S. Miller, Andreas Larsson,
	Richard Weinberger, Anton Ivanov, Johannes Berg, Thomas Gleixner,
	Ingo Molnar, Borislav Petkov, Dave Hansen, x86, H. Peter Anvin,
	Kees Cook, Arnd Bergmann, Masahiro Yamada, Alexey Gladkov,
	linux-alpha, linux-kernel, linux-snps-arc, linux-arm-kernel,
	linux-csky, linux-hexagon, loongarch, linux-m68k, linux-mips,
	linux-openrisc, linux-parisc, linuxppc-dev, linux-riscv,
	linux-s390, linux-sh, sparclinux, linux-um, linux-kbuild, stable,
	Ed W

Commit 3e86e4d74c04 ("kbuild: keep .modinfo section in
vmlinux.unstripped") added .modinfo to ELF_DETAILS while removing it
from 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 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 ddc6cbef3ef1 ("s390/boot/vmlinux.lds.S: Ensure bzImage ends with
SecureBoot trailer") recently addressed this for the s390 bzImage but
the same bug remains for parisc and x86. The presence of .modinfo in the
x86 bzImage was the root cause of the issue workad around with
commit d50f21091358 ("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 DISCARDS, as it has never been
necessary in those uses.

Cc: stable@vger.kernel.org
Fixes: 3e86e4d74c04 ("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
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
---
I intend to take this as a fix via the Kbuild tree for 7.0 after
sufficient testing in -next, please Ack accordingly.
---
 arch/alpha/kernel/vmlinux.lds.S           | 1 +
 arch/arc/kernel/vmlinux.lds.S             | 1 +
 arch/arm64/kernel/vmlinux.lds.S           | 1 +
 arch/csky/kernel/vmlinux.lds.S            | 1 +
 arch/hexagon/kernel/vmlinux.lds.S         | 1 +
 arch/loongarch/kernel/vmlinux.lds.S       | 1 +
 arch/m68k/kernel/vmlinux-nommu.lds        | 1 +
 arch/m68k/kernel/vmlinux-std.lds          | 1 +
 arch/m68k/kernel/vmlinux-sun3.lds         | 1 +
 arch/mips/kernel/vmlinux.lds.S            | 1 +
 arch/nios2/kernel/vmlinux.lds.S           | 1 +
 arch/openrisc/kernel/vmlinux.lds.S        | 1 +
 arch/parisc/boot/compressed/vmlinux.lds.S | 1 +
 arch/parisc/kernel/vmlinux.lds.S          | 1 +
 arch/powerpc/kernel/vmlinux.lds.S         | 1 +
 arch/riscv/kernel/vmlinux.lds.S           | 1 +
 arch/s390/kernel/vmlinux.lds.S            | 1 +
 arch/sh/kernel/vmlinux.lds.S              | 1 +
 arch/sparc/kernel/vmlinux.lds.S           | 1 +
 arch/um/kernel/dyn.lds.S                  | 1 +
 arch/um/kernel/uml.lds.S                  | 1 +
 arch/x86/boot/compressed/vmlinux.lds.S    | 2 +-
 arch/x86/kernel/vmlinux.lds.S             | 1 +
 include/asm-generic/vmlinux.lds.h         | 4 +++-
 24 files changed, 26 insertions(+), 2 deletions(-)

diff --git a/arch/alpha/kernel/vmlinux.lds.S b/arch/alpha/kernel/vmlinux.lds.S
index 2efa7dfc798a..2d136c63db16 100644
--- a/arch/alpha/kernel/vmlinux.lds.S
+++ b/arch/alpha/kernel/vmlinux.lds.S
@@ -71,6 +71,7 @@ SECTIONS
 
 	STABS_DEBUG
 	DWARF_DEBUG
+	MODINFO
 	ELF_DETAILS
 
 	DISCARDS
diff --git a/arch/arc/kernel/vmlinux.lds.S b/arch/arc/kernel/vmlinux.lds.S
index 61a1b2b96e1d..6af63084ff28 100644
--- a/arch/arc/kernel/vmlinux.lds.S
+++ b/arch/arc/kernel/vmlinux.lds.S
@@ -123,6 +123,7 @@ SECTIONS
 	_end = . ;
 
 	STABS_DEBUG
+	MODINFO
 	ELF_DETAILS
 	DISCARDS
 
diff --git a/arch/arm64/kernel/vmlinux.lds.S b/arch/arm64/kernel/vmlinux.lds.S
index ad6133b89e7a..2964aad0362e 100644
--- a/arch/arm64/kernel/vmlinux.lds.S
+++ b/arch/arm64/kernel/vmlinux.lds.S
@@ -349,6 +349,7 @@ SECTIONS
 
 	STABS_DEBUG
 	DWARF_DEBUG
+	MODINFO
 	ELF_DETAILS
 
 	HEAD_SYMBOLS
diff --git a/arch/csky/kernel/vmlinux.lds.S b/arch/csky/kernel/vmlinux.lds.S
index d718961786d2..81943981b3af 100644
--- a/arch/csky/kernel/vmlinux.lds.S
+++ b/arch/csky/kernel/vmlinux.lds.S
@@ -109,6 +109,7 @@ SECTIONS
 
 	STABS_DEBUG
 	DWARF_DEBUG
+	MODINFO
 	ELF_DETAILS
 
 	DISCARDS
diff --git a/arch/hexagon/kernel/vmlinux.lds.S b/arch/hexagon/kernel/vmlinux.lds.S
index 1150b77fa281..aae22283b5e0 100644
--- a/arch/hexagon/kernel/vmlinux.lds.S
+++ b/arch/hexagon/kernel/vmlinux.lds.S
@@ -62,6 +62,7 @@ SECTIONS
 
 	STABS_DEBUG
 	DWARF_DEBUG
+	MODINFO
 	ELF_DETAILS
 	.hexagon.attributes 0 : { *(.hexagon.attributes) }
 
diff --git a/arch/loongarch/kernel/vmlinux.lds.S b/arch/loongarch/kernel/vmlinux.lds.S
index 08ea921cdec1..d0e1377a041d 100644
--- a/arch/loongarch/kernel/vmlinux.lds.S
+++ b/arch/loongarch/kernel/vmlinux.lds.S
@@ -147,6 +147,7 @@ SECTIONS
 
 	STABS_DEBUG
 	DWARF_DEBUG
+	MODINFO
 	ELF_DETAILS
 
 #ifdef CONFIG_EFI_STUB
diff --git a/arch/m68k/kernel/vmlinux-nommu.lds b/arch/m68k/kernel/vmlinux-nommu.lds
index 2624fc18c131..45d7f4b0177b 100644
--- a/arch/m68k/kernel/vmlinux-nommu.lds
+++ b/arch/m68k/kernel/vmlinux-nommu.lds
@@ -85,6 +85,7 @@ SECTIONS {
 	_end = .;
 
 	STABS_DEBUG
+	MODINFO
 	ELF_DETAILS
 
 	/* Sections to be discarded */
diff --git a/arch/m68k/kernel/vmlinux-std.lds b/arch/m68k/kernel/vmlinux-std.lds
index 1ccdd04ae462..7326586afe15 100644
--- a/arch/m68k/kernel/vmlinux-std.lds
+++ b/arch/m68k/kernel/vmlinux-std.lds
@@ -58,6 +58,7 @@ SECTIONS
   _end = . ;
 
   STABS_DEBUG
+  MODINFO
   ELF_DETAILS
 
   /* Sections to be discarded */
diff --git a/arch/m68k/kernel/vmlinux-sun3.lds b/arch/m68k/kernel/vmlinux-sun3.lds
index f13ddcc2af5c..1b19fef201fb 100644
--- a/arch/m68k/kernel/vmlinux-sun3.lds
+++ b/arch/m68k/kernel/vmlinux-sun3.lds
@@ -51,6 +51,7 @@ __init_begin = .;
   _end = . ;
 
   STABS_DEBUG
+  MODINFO
   ELF_DETAILS
 
   /* Sections to be discarded */
diff --git a/arch/mips/kernel/vmlinux.lds.S b/arch/mips/kernel/vmlinux.lds.S
index 2b708fac8d2c..579b2cc1995a 100644
--- a/arch/mips/kernel/vmlinux.lds.S
+++ b/arch/mips/kernel/vmlinux.lds.S
@@ -217,6 +217,7 @@ SECTIONS
 
 	STABS_DEBUG
 	DWARF_DEBUG
+	MODINFO
 	ELF_DETAILS
 
 	/* These must appear regardless of  .  */
diff --git a/arch/nios2/kernel/vmlinux.lds.S b/arch/nios2/kernel/vmlinux.lds.S
index 37b958055064..206f92445bfa 100644
--- a/arch/nios2/kernel/vmlinux.lds.S
+++ b/arch/nios2/kernel/vmlinux.lds.S
@@ -57,6 +57,7 @@ SECTIONS
 
 	STABS_DEBUG
 	DWARF_DEBUG
+	MODINFO
 	ELF_DETAILS
 
 	DISCARDS
diff --git a/arch/openrisc/kernel/vmlinux.lds.S b/arch/openrisc/kernel/vmlinux.lds.S
index 049bff45f612..9b29c3211774 100644
--- a/arch/openrisc/kernel/vmlinux.lds.S
+++ b/arch/openrisc/kernel/vmlinux.lds.S
@@ -101,6 +101,7 @@ SECTIONS
 	/* Throw in the debugging sections */
 	STABS_DEBUG
 	DWARF_DEBUG
+	MODINFO
 	ELF_DETAILS
 
         /* Sections to be discarded -- must be last */
diff --git a/arch/parisc/boot/compressed/vmlinux.lds.S b/arch/parisc/boot/compressed/vmlinux.lds.S
index ab7b43990857..87d24cc824b6 100644
--- a/arch/parisc/boot/compressed/vmlinux.lds.S
+++ b/arch/parisc/boot/compressed/vmlinux.lds.S
@@ -90,6 +90,7 @@ SECTIONS
 	/* Sections to be discarded */
 	DISCARDS
 	/DISCARD/ : {
+		*(.modinfo)
 #ifdef CONFIG_64BIT
 		/* temporary hack until binutils is fixed to not emit these
 		 * for static binaries
diff --git a/arch/parisc/kernel/vmlinux.lds.S b/arch/parisc/kernel/vmlinux.lds.S
index b445e47903cf..0ca93d6d7235 100644
--- a/arch/parisc/kernel/vmlinux.lds.S
+++ b/arch/parisc/kernel/vmlinux.lds.S
@@ -165,6 +165,7 @@ SECTIONS
 	_end = . ;
 
 	STABS_DEBUG
+	MODINFO
 	ELF_DETAILS
 	.note 0 : { *(.note) }
 
diff --git a/arch/powerpc/kernel/vmlinux.lds.S b/arch/powerpc/kernel/vmlinux.lds.S
index 15850296c0a9..8fc11d6565bf 100644
--- a/arch/powerpc/kernel/vmlinux.lds.S
+++ b/arch/powerpc/kernel/vmlinux.lds.S
@@ -397,6 +397,7 @@ SECTIONS
 	_end = . ;
 
 	DWARF_DEBUG
+	MODINFO
 	ELF_DETAILS
 
 	DISCARDS
diff --git a/arch/riscv/kernel/vmlinux.lds.S b/arch/riscv/kernel/vmlinux.lds.S
index 61bd5ba6680a..997f9eb3b22b 100644
--- a/arch/riscv/kernel/vmlinux.lds.S
+++ b/arch/riscv/kernel/vmlinux.lds.S
@@ -170,6 +170,7 @@ SECTIONS
 
 	STABS_DEBUG
 	DWARF_DEBUG
+	MODINFO
 	ELF_DETAILS
 	.riscv.attributes 0 : { *(.riscv.attributes) }
 
diff --git a/arch/s390/kernel/vmlinux.lds.S b/arch/s390/kernel/vmlinux.lds.S
index 53bcbb91bb9b..2b62395e35bf 100644
--- a/arch/s390/kernel/vmlinux.lds.S
+++ b/arch/s390/kernel/vmlinux.lds.S
@@ -221,6 +221,7 @@ SECTIONS
 	/* Debugging sections.	*/
 	STABS_DEBUG
 	DWARF_DEBUG
+	MODINFO
 	ELF_DETAILS
 
 	/*
diff --git a/arch/sh/kernel/vmlinux.lds.S b/arch/sh/kernel/vmlinux.lds.S
index 008c30289eaa..169c63fb3c1d 100644
--- a/arch/sh/kernel/vmlinux.lds.S
+++ b/arch/sh/kernel/vmlinux.lds.S
@@ -89,6 +89,7 @@ SECTIONS
 
 	STABS_DEBUG
 	DWARF_DEBUG
+	MODINFO
 	ELF_DETAILS
 
 	DISCARDS
diff --git a/arch/sparc/kernel/vmlinux.lds.S b/arch/sparc/kernel/vmlinux.lds.S
index f1b86eb30340..7ea510d9b42f 100644
--- a/arch/sparc/kernel/vmlinux.lds.S
+++ b/arch/sparc/kernel/vmlinux.lds.S
@@ -191,6 +191,7 @@ SECTIONS
 
 	STABS_DEBUG
 	DWARF_DEBUG
+	MODINFO
 	ELF_DETAILS
 
 	DISCARDS
diff --git a/arch/um/kernel/dyn.lds.S b/arch/um/kernel/dyn.lds.S
index a36b7918a011..ad3cefeff2ac 100644
--- a/arch/um/kernel/dyn.lds.S
+++ b/arch/um/kernel/dyn.lds.S
@@ -172,6 +172,7 @@ SECTIONS
 
   STABS_DEBUG
   DWARF_DEBUG
+  MODINFO
   ELF_DETAILS
 
   DISCARDS
diff --git a/arch/um/kernel/uml.lds.S b/arch/um/kernel/uml.lds.S
index a409d4b66114..30aa24348d60 100644
--- a/arch/um/kernel/uml.lds.S
+++ b/arch/um/kernel/uml.lds.S
@@ -113,6 +113,7 @@ SECTIONS
 
   STABS_DEBUG
   DWARF_DEBUG
+  MODINFO
   ELF_DETAILS
 
   DISCARDS
diff --git a/arch/x86/boot/compressed/vmlinux.lds.S b/arch/x86/boot/compressed/vmlinux.lds.S
index 587ce3e7c504..e0b152715d9c 100644
--- a/arch/x86/boot/compressed/vmlinux.lds.S
+++ b/arch/x86/boot/compressed/vmlinux.lds.S
@@ -88,7 +88,7 @@ SECTIONS
 	/DISCARD/ : {
 		*(.dynamic) *(.dynsym) *(.dynstr) *(.dynbss)
 		*(.hash) *(.gnu.hash)
-		*(.note.*)
+		*(.note.*) *(.modinfo)
 	}
 
 	.got.plt (INFO) : {
diff --git a/arch/x86/kernel/vmlinux.lds.S b/arch/x86/kernel/vmlinux.lds.S
index 3a24a3fc55f5..4711a35e706c 100644
--- a/arch/x86/kernel/vmlinux.lds.S
+++ b/arch/x86/kernel/vmlinux.lds.S
@@ -427,6 +427,7 @@ SECTIONS
 	.llvm_bb_addr_map : { *(.llvm_bb_addr_map) }
 #endif
 
+	MODINFO
 	ELF_DETAILS
 
 	DISCARDS
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index eeb070f330bd..1e1580febe4b 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -848,12 +848,14 @@
 
 /* Required sections not related to debugging. */
 #define ELF_DETAILS							\
-		.modinfo : { *(.modinfo) . = ALIGN(8); }		\
 		.comment 0 : { *(.comment) }				\
 		.symtab 0 : { *(.symtab) }				\
 		.strtab 0 : { *(.strtab) }				\
 		.shstrtab 0 : { *(.shstrtab) }
 
+#define MODINFO								\
+		.modinfo : { *(.modinfo) . = ALIGN(8); }
+
 #ifdef CONFIG_GENERIC_BUG
 #define BUG_TABLE							\
 	. = ALIGN(8);							\

---
base-commit: 6de23f81a5e08be8fbf5e8d7e9febc72a5b5f27f
change-id: 20260224-separate-modinfo-from-elf-details-d3160da5f399

Best regards,
--  
Nathan Chancellor <nathan@kernel.org>


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH] kbuild: Split .modinfo out from ELF_DETAILS
@ 2026-02-25 22:02 ` Nathan Chancellor
  0 siblings, 0 replies; 9+ messages in thread
From: Nathan Chancellor @ 2026-02-25 22:02 UTC (permalink / raw)
  To: Nathan Chancellor, Nicolas Schier
  Cc: Richard Henderson, Matt Turner, Magnus Lindholm, Vineet Gupta,
	Catalin Marinas, Will Deacon, Guo Ren, Brian Cain, Huacai Chen,
	WANG Xuerui, Geert Uytterhoeven, Sam Creasey, Thomas Bogendoerfer,
	Dinh Nguyen, Jonas Bonn, Stefan Kristiansson, Stafford Horne,
	James E.J. Bottomley, Helge Deller, Madhavan Srinivasan,
	Michael Ellerman, Nicholas Piggin, Christophe Leroy (CS GROUP),
	Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti,
	Heiko Carstens, Vasily Gorbik, Alexander Gordeev,
	Christian Borntraeger, Sven Schnelle, Yoshinori Sato, Rich Felker,
	John Paul Adrian Glaubitz, David S. Miller, Andreas Larsson,
	Richard Weinberger, Anton Ivanov, Johannes Berg, Thomas Gleixner,
	Ingo Molnar, Borislav Petkov, Dave Hansen, x86, H. Peter Anvin,
	Kees Cook, Arnd Bergmann, Masahiro Yamada, Alexey Gladkov,
	linux-alpha, linux-kernel, linux-snps-arc, linux-arm-kernel,
	linux-csky, linux-hexagon, loongarch, linux-m68k, linux-mips,
	linux-openrisc, linux-parisc, linuxppc-dev, linux-riscv,
	linux-s390, linux-sh, sparclinux, linux-um, linux-kbuild, stable,
	Ed W

Commit 3e86e4d74c04 ("kbuild: keep .modinfo section in
vmlinux.unstripped") added .modinfo to ELF_DETAILS while removing it
from 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 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 ddc6cbef3ef1 ("s390/boot/vmlinux.lds.S: Ensure bzImage ends with
SecureBoot trailer") recently addressed this for the s390 bzImage but
the same bug remains for parisc and x86. The presence of .modinfo in the
x86 bzImage was the root cause of the issue workad around with
commit d50f21091358 ("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 DISCARDS, as it has never been
necessary in those uses.

Cc: stable@vger.kernel.org
Fixes: 3e86e4d74c04 ("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
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
---
I intend to take this as a fix via the Kbuild tree for 7.0 after
sufficient testing in -next, please Ack accordingly.
---
 arch/alpha/kernel/vmlinux.lds.S           | 1 +
 arch/arc/kernel/vmlinux.lds.S             | 1 +
 arch/arm64/kernel/vmlinux.lds.S           | 1 +
 arch/csky/kernel/vmlinux.lds.S            | 1 +
 arch/hexagon/kernel/vmlinux.lds.S         | 1 +
 arch/loongarch/kernel/vmlinux.lds.S       | 1 +
 arch/m68k/kernel/vmlinux-nommu.lds        | 1 +
 arch/m68k/kernel/vmlinux-std.lds          | 1 +
 arch/m68k/kernel/vmlinux-sun3.lds         | 1 +
 arch/mips/kernel/vmlinux.lds.S            | 1 +
 arch/nios2/kernel/vmlinux.lds.S           | 1 +
 arch/openrisc/kernel/vmlinux.lds.S        | 1 +
 arch/parisc/boot/compressed/vmlinux.lds.S | 1 +
 arch/parisc/kernel/vmlinux.lds.S          | 1 +
 arch/powerpc/kernel/vmlinux.lds.S         | 1 +
 arch/riscv/kernel/vmlinux.lds.S           | 1 +
 arch/s390/kernel/vmlinux.lds.S            | 1 +
 arch/sh/kernel/vmlinux.lds.S              | 1 +
 arch/sparc/kernel/vmlinux.lds.S           | 1 +
 arch/um/kernel/dyn.lds.S                  | 1 +
 arch/um/kernel/uml.lds.S                  | 1 +
 arch/x86/boot/compressed/vmlinux.lds.S    | 2 +-
 arch/x86/kernel/vmlinux.lds.S             | 1 +
 include/asm-generic/vmlinux.lds.h         | 4 +++-
 24 files changed, 26 insertions(+), 2 deletions(-)

diff --git a/arch/alpha/kernel/vmlinux.lds.S b/arch/alpha/kernel/vmlinux.lds.S
index 2efa7dfc798a..2d136c63db16 100644
--- a/arch/alpha/kernel/vmlinux.lds.S
+++ b/arch/alpha/kernel/vmlinux.lds.S
@@ -71,6 +71,7 @@ SECTIONS
 
 	STABS_DEBUG
 	DWARF_DEBUG
+	MODINFO
 	ELF_DETAILS
 
 	DISCARDS
diff --git a/arch/arc/kernel/vmlinux.lds.S b/arch/arc/kernel/vmlinux.lds.S
index 61a1b2b96e1d..6af63084ff28 100644
--- a/arch/arc/kernel/vmlinux.lds.S
+++ b/arch/arc/kernel/vmlinux.lds.S
@@ -123,6 +123,7 @@ SECTIONS
 	_end = . ;
 
 	STABS_DEBUG
+	MODINFO
 	ELF_DETAILS
 	DISCARDS
 
diff --git a/arch/arm64/kernel/vmlinux.lds.S b/arch/arm64/kernel/vmlinux.lds.S
index ad6133b89e7a..2964aad0362e 100644
--- a/arch/arm64/kernel/vmlinux.lds.S
+++ b/arch/arm64/kernel/vmlinux.lds.S
@@ -349,6 +349,7 @@ SECTIONS
 
 	STABS_DEBUG
 	DWARF_DEBUG
+	MODINFO
 	ELF_DETAILS
 
 	HEAD_SYMBOLS
diff --git a/arch/csky/kernel/vmlinux.lds.S b/arch/csky/kernel/vmlinux.lds.S
index d718961786d2..81943981b3af 100644
--- a/arch/csky/kernel/vmlinux.lds.S
+++ b/arch/csky/kernel/vmlinux.lds.S
@@ -109,6 +109,7 @@ SECTIONS
 
 	STABS_DEBUG
 	DWARF_DEBUG
+	MODINFO
 	ELF_DETAILS
 
 	DISCARDS
diff --git a/arch/hexagon/kernel/vmlinux.lds.S b/arch/hexagon/kernel/vmlinux.lds.S
index 1150b77fa281..aae22283b5e0 100644
--- a/arch/hexagon/kernel/vmlinux.lds.S
+++ b/arch/hexagon/kernel/vmlinux.lds.S
@@ -62,6 +62,7 @@ SECTIONS
 
 	STABS_DEBUG
 	DWARF_DEBUG
+	MODINFO
 	ELF_DETAILS
 	.hexagon.attributes 0 : { *(.hexagon.attributes) }
 
diff --git a/arch/loongarch/kernel/vmlinux.lds.S b/arch/loongarch/kernel/vmlinux.lds.S
index 08ea921cdec1..d0e1377a041d 100644
--- a/arch/loongarch/kernel/vmlinux.lds.S
+++ b/arch/loongarch/kernel/vmlinux.lds.S
@@ -147,6 +147,7 @@ SECTIONS
 
 	STABS_DEBUG
 	DWARF_DEBUG
+	MODINFO
 	ELF_DETAILS
 
 #ifdef CONFIG_EFI_STUB
diff --git a/arch/m68k/kernel/vmlinux-nommu.lds b/arch/m68k/kernel/vmlinux-nommu.lds
index 2624fc18c131..45d7f4b0177b 100644
--- a/arch/m68k/kernel/vmlinux-nommu.lds
+++ b/arch/m68k/kernel/vmlinux-nommu.lds
@@ -85,6 +85,7 @@ SECTIONS {
 	_end = .;
 
 	STABS_DEBUG
+	MODINFO
 	ELF_DETAILS
 
 	/* Sections to be discarded */
diff --git a/arch/m68k/kernel/vmlinux-std.lds b/arch/m68k/kernel/vmlinux-std.lds
index 1ccdd04ae462..7326586afe15 100644
--- a/arch/m68k/kernel/vmlinux-std.lds
+++ b/arch/m68k/kernel/vmlinux-std.lds
@@ -58,6 +58,7 @@ SECTIONS
   _end = . ;
 
   STABS_DEBUG
+  MODINFO
   ELF_DETAILS
 
   /* Sections to be discarded */
diff --git a/arch/m68k/kernel/vmlinux-sun3.lds b/arch/m68k/kernel/vmlinux-sun3.lds
index f13ddcc2af5c..1b19fef201fb 100644
--- a/arch/m68k/kernel/vmlinux-sun3.lds
+++ b/arch/m68k/kernel/vmlinux-sun3.lds
@@ -51,6 +51,7 @@ __init_begin = .;
   _end = . ;
 
   STABS_DEBUG
+  MODINFO
   ELF_DETAILS
 
   /* Sections to be discarded */
diff --git a/arch/mips/kernel/vmlinux.lds.S b/arch/mips/kernel/vmlinux.lds.S
index 2b708fac8d2c..579b2cc1995a 100644
--- a/arch/mips/kernel/vmlinux.lds.S
+++ b/arch/mips/kernel/vmlinux.lds.S
@@ -217,6 +217,7 @@ SECTIONS
 
 	STABS_DEBUG
 	DWARF_DEBUG
+	MODINFO
 	ELF_DETAILS
 
 	/* These must appear regardless of  .  */
diff --git a/arch/nios2/kernel/vmlinux.lds.S b/arch/nios2/kernel/vmlinux.lds.S
index 37b958055064..206f92445bfa 100644
--- a/arch/nios2/kernel/vmlinux.lds.S
+++ b/arch/nios2/kernel/vmlinux.lds.S
@@ -57,6 +57,7 @@ SECTIONS
 
 	STABS_DEBUG
 	DWARF_DEBUG
+	MODINFO
 	ELF_DETAILS
 
 	DISCARDS
diff --git a/arch/openrisc/kernel/vmlinux.lds.S b/arch/openrisc/kernel/vmlinux.lds.S
index 049bff45f612..9b29c3211774 100644
--- a/arch/openrisc/kernel/vmlinux.lds.S
+++ b/arch/openrisc/kernel/vmlinux.lds.S
@@ -101,6 +101,7 @@ SECTIONS
 	/* Throw in the debugging sections */
 	STABS_DEBUG
 	DWARF_DEBUG
+	MODINFO
 	ELF_DETAILS
 
         /* Sections to be discarded -- must be last */
diff --git a/arch/parisc/boot/compressed/vmlinux.lds.S b/arch/parisc/boot/compressed/vmlinux.lds.S
index ab7b43990857..87d24cc824b6 100644
--- a/arch/parisc/boot/compressed/vmlinux.lds.S
+++ b/arch/parisc/boot/compressed/vmlinux.lds.S
@@ -90,6 +90,7 @@ SECTIONS
 	/* Sections to be discarded */
 	DISCARDS
 	/DISCARD/ : {
+		*(.modinfo)
 #ifdef CONFIG_64BIT
 		/* temporary hack until binutils is fixed to not emit these
 		 * for static binaries
diff --git a/arch/parisc/kernel/vmlinux.lds.S b/arch/parisc/kernel/vmlinux.lds.S
index b445e47903cf..0ca93d6d7235 100644
--- a/arch/parisc/kernel/vmlinux.lds.S
+++ b/arch/parisc/kernel/vmlinux.lds.S
@@ -165,6 +165,7 @@ SECTIONS
 	_end = . ;
 
 	STABS_DEBUG
+	MODINFO
 	ELF_DETAILS
 	.note 0 : { *(.note) }
 
diff --git a/arch/powerpc/kernel/vmlinux.lds.S b/arch/powerpc/kernel/vmlinux.lds.S
index 15850296c0a9..8fc11d6565bf 100644
--- a/arch/powerpc/kernel/vmlinux.lds.S
+++ b/arch/powerpc/kernel/vmlinux.lds.S
@@ -397,6 +397,7 @@ SECTIONS
 	_end = . ;
 
 	DWARF_DEBUG
+	MODINFO
 	ELF_DETAILS
 
 	DISCARDS
diff --git a/arch/riscv/kernel/vmlinux.lds.S b/arch/riscv/kernel/vmlinux.lds.S
index 61bd5ba6680a..997f9eb3b22b 100644
--- a/arch/riscv/kernel/vmlinux.lds.S
+++ b/arch/riscv/kernel/vmlinux.lds.S
@@ -170,6 +170,7 @@ SECTIONS
 
 	STABS_DEBUG
 	DWARF_DEBUG
+	MODINFO
 	ELF_DETAILS
 	.riscv.attributes 0 : { *(.riscv.attributes) }
 
diff --git a/arch/s390/kernel/vmlinux.lds.S b/arch/s390/kernel/vmlinux.lds.S
index 53bcbb91bb9b..2b62395e35bf 100644
--- a/arch/s390/kernel/vmlinux.lds.S
+++ b/arch/s390/kernel/vmlinux.lds.S
@@ -221,6 +221,7 @@ SECTIONS
 	/* Debugging sections.	*/
 	STABS_DEBUG
 	DWARF_DEBUG
+	MODINFO
 	ELF_DETAILS
 
 	/*
diff --git a/arch/sh/kernel/vmlinux.lds.S b/arch/sh/kernel/vmlinux.lds.S
index 008c30289eaa..169c63fb3c1d 100644
--- a/arch/sh/kernel/vmlinux.lds.S
+++ b/arch/sh/kernel/vmlinux.lds.S
@@ -89,6 +89,7 @@ SECTIONS
 
 	STABS_DEBUG
 	DWARF_DEBUG
+	MODINFO
 	ELF_DETAILS
 
 	DISCARDS
diff --git a/arch/sparc/kernel/vmlinux.lds.S b/arch/sparc/kernel/vmlinux.lds.S
index f1b86eb30340..7ea510d9b42f 100644
--- a/arch/sparc/kernel/vmlinux.lds.S
+++ b/arch/sparc/kernel/vmlinux.lds.S
@@ -191,6 +191,7 @@ SECTIONS
 
 	STABS_DEBUG
 	DWARF_DEBUG
+	MODINFO
 	ELF_DETAILS
 
 	DISCARDS
diff --git a/arch/um/kernel/dyn.lds.S b/arch/um/kernel/dyn.lds.S
index a36b7918a011..ad3cefeff2ac 100644
--- a/arch/um/kernel/dyn.lds.S
+++ b/arch/um/kernel/dyn.lds.S
@@ -172,6 +172,7 @@ SECTIONS
 
   STABS_DEBUG
   DWARF_DEBUG
+  MODINFO
   ELF_DETAILS
 
   DISCARDS
diff --git a/arch/um/kernel/uml.lds.S b/arch/um/kernel/uml.lds.S
index a409d4b66114..30aa24348d60 100644
--- a/arch/um/kernel/uml.lds.S
+++ b/arch/um/kernel/uml.lds.S
@@ -113,6 +113,7 @@ SECTIONS
 
   STABS_DEBUG
   DWARF_DEBUG
+  MODINFO
   ELF_DETAILS
 
   DISCARDS
diff --git a/arch/x86/boot/compressed/vmlinux.lds.S b/arch/x86/boot/compressed/vmlinux.lds.S
index 587ce3e7c504..e0b152715d9c 100644
--- a/arch/x86/boot/compressed/vmlinux.lds.S
+++ b/arch/x86/boot/compressed/vmlinux.lds.S
@@ -88,7 +88,7 @@ SECTIONS
 	/DISCARD/ : {
 		*(.dynamic) *(.dynsym) *(.dynstr) *(.dynbss)
 		*(.hash) *(.gnu.hash)
-		*(.note.*)
+		*(.note.*) *(.modinfo)
 	}
 
 	.got.plt (INFO) : {
diff --git a/arch/x86/kernel/vmlinux.lds.S b/arch/x86/kernel/vmlinux.lds.S
index 3a24a3fc55f5..4711a35e706c 100644
--- a/arch/x86/kernel/vmlinux.lds.S
+++ b/arch/x86/kernel/vmlinux.lds.S
@@ -427,6 +427,7 @@ SECTIONS
 	.llvm_bb_addr_map : { *(.llvm_bb_addr_map) }
 #endif
 
+	MODINFO
 	ELF_DETAILS
 
 	DISCARDS
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index eeb070f330bd..1e1580febe4b 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -848,12 +848,14 @@
 
 /* Required sections not related to debugging. */
 #define ELF_DETAILS							\
-		.modinfo : { *(.modinfo) . = ALIGN(8); }		\
 		.comment 0 : { *(.comment) }				\
 		.symtab 0 : { *(.symtab) }				\
 		.strtab 0 : { *(.strtab) }				\
 		.shstrtab 0 : { *(.shstrtab) }
 
+#define MODINFO								\
+		.modinfo : { *(.modinfo) . = ALIGN(8); }
+
 #ifdef CONFIG_GENERIC_BUG
 #define BUG_TABLE							\
 	. = ALIGN(8);							\

---
base-commit: 6de23f81a5e08be8fbf5e8d7e9febc72a5b5f27f
change-id: 20260224-separate-modinfo-from-elf-details-d3160da5f399

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 related	[flat|nested] 9+ messages in thread

* [PATCH] kbuild: Split .modinfo out from ELF_DETAILS
@ 2026-02-25 22:02 ` Nathan Chancellor
  0 siblings, 0 replies; 9+ messages in thread
From: Nathan Chancellor @ 2026-02-25 22:02 UTC (permalink / raw)
  To: Nathan Chancellor, Nicolas Schier
  Cc: Richard Henderson, Matt Turner, Magnus Lindholm, Vineet Gupta,
	Catalin Marinas, Will Deacon, Guo Ren, Brian Cain, Huacai Chen,
	WANG Xuerui, Geert Uytterhoeven, Sam Creasey, Thomas Bogendoerfer,
	Dinh Nguyen, Jonas Bonn, Stefan Kristiansson, Stafford Horne,
	James E.J. Bottomley, Helge Deller, Madhavan Srinivasan,
	Michael Ellerman, Nicholas Piggin, Christophe Leroy (CS GROUP),
	Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti,
	Heiko Carstens, Vasily Gorbik, Alexander Gordeev,
	Christian Borntraeger, Sven Schnelle, Yoshinori Sato, Rich Felker,
	John Paul Adrian Glaubitz, David S. Miller, Andreas Larsson,
	Richard Weinberger, Anton Ivanov, Johannes Berg, Thomas Gleixner,
	Ingo Molnar, Borislav Petkov, Dave Hansen, x86, H. Peter Anvin,
	Kees Cook, Arnd Bergmann, Masahiro Yamada, Alexey Gladkov,
	linux-alpha, linux-kernel, linux-snps-arc, linux-arm-kernel,
	linux-csky, linux-hexagon, loongarch, linux-m68k, linux-mips,
	linux-openrisc, linux-parisc, linuxppc-dev, linux-riscv,
	linux-s390, linux-sh, sparclinux, linux-um, linux-kbuild, stable,
	Ed W

Commit 3e86e4d74c04 ("kbuild: keep .modinfo section in
vmlinux.unstripped") added .modinfo to ELF_DETAILS while removing it
from 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 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 ddc6cbef3ef1 ("s390/boot/vmlinux.lds.S: Ensure bzImage ends with
SecureBoot trailer") recently addressed this for the s390 bzImage but
the same bug remains for parisc and x86. The presence of .modinfo in the
x86 bzImage was the root cause of the issue workad around with
commit d50f21091358 ("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 DISCARDS, as it has never been
necessary in those uses.

Cc: stable@vger.kernel.org
Fixes: 3e86e4d74c04 ("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
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
---
I intend to take this as a fix via the Kbuild tree for 7.0 after
sufficient testing in -next, please Ack accordingly.
---
 arch/alpha/kernel/vmlinux.lds.S           | 1 +
 arch/arc/kernel/vmlinux.lds.S             | 1 +
 arch/arm64/kernel/vmlinux.lds.S           | 1 +
 arch/csky/kernel/vmlinux.lds.S            | 1 +
 arch/hexagon/kernel/vmlinux.lds.S         | 1 +
 arch/loongarch/kernel/vmlinux.lds.S       | 1 +
 arch/m68k/kernel/vmlinux-nommu.lds        | 1 +
 arch/m68k/kernel/vmlinux-std.lds          | 1 +
 arch/m68k/kernel/vmlinux-sun3.lds         | 1 +
 arch/mips/kernel/vmlinux.lds.S            | 1 +
 arch/nios2/kernel/vmlinux.lds.S           | 1 +
 arch/openrisc/kernel/vmlinux.lds.S        | 1 +
 arch/parisc/boot/compressed/vmlinux.lds.S | 1 +
 arch/parisc/kernel/vmlinux.lds.S          | 1 +
 arch/powerpc/kernel/vmlinux.lds.S         | 1 +
 arch/riscv/kernel/vmlinux.lds.S           | 1 +
 arch/s390/kernel/vmlinux.lds.S            | 1 +
 arch/sh/kernel/vmlinux.lds.S              | 1 +
 arch/sparc/kernel/vmlinux.lds.S           | 1 +
 arch/um/kernel/dyn.lds.S                  | 1 +
 arch/um/kernel/uml.lds.S                  | 1 +
 arch/x86/boot/compressed/vmlinux.lds.S    | 2 +-
 arch/x86/kernel/vmlinux.lds.S             | 1 +
 include/asm-generic/vmlinux.lds.h         | 4 +++-
 24 files changed, 26 insertions(+), 2 deletions(-)

diff --git a/arch/alpha/kernel/vmlinux.lds.S b/arch/alpha/kernel/vmlinux.lds.S
index 2efa7dfc798a..2d136c63db16 100644
--- a/arch/alpha/kernel/vmlinux.lds.S
+++ b/arch/alpha/kernel/vmlinux.lds.S
@@ -71,6 +71,7 @@ SECTIONS
 
 	STABS_DEBUG
 	DWARF_DEBUG
+	MODINFO
 	ELF_DETAILS
 
 	DISCARDS
diff --git a/arch/arc/kernel/vmlinux.lds.S b/arch/arc/kernel/vmlinux.lds.S
index 61a1b2b96e1d..6af63084ff28 100644
--- a/arch/arc/kernel/vmlinux.lds.S
+++ b/arch/arc/kernel/vmlinux.lds.S
@@ -123,6 +123,7 @@ SECTIONS
 	_end = . ;
 
 	STABS_DEBUG
+	MODINFO
 	ELF_DETAILS
 	DISCARDS
 
diff --git a/arch/arm64/kernel/vmlinux.lds.S b/arch/arm64/kernel/vmlinux.lds.S
index ad6133b89e7a..2964aad0362e 100644
--- a/arch/arm64/kernel/vmlinux.lds.S
+++ b/arch/arm64/kernel/vmlinux.lds.S
@@ -349,6 +349,7 @@ SECTIONS
 
 	STABS_DEBUG
 	DWARF_DEBUG
+	MODINFO
 	ELF_DETAILS
 
 	HEAD_SYMBOLS
diff --git a/arch/csky/kernel/vmlinux.lds.S b/arch/csky/kernel/vmlinux.lds.S
index d718961786d2..81943981b3af 100644
--- a/arch/csky/kernel/vmlinux.lds.S
+++ b/arch/csky/kernel/vmlinux.lds.S
@@ -109,6 +109,7 @@ SECTIONS
 
 	STABS_DEBUG
 	DWARF_DEBUG
+	MODINFO
 	ELF_DETAILS
 
 	DISCARDS
diff --git a/arch/hexagon/kernel/vmlinux.lds.S b/arch/hexagon/kernel/vmlinux.lds.S
index 1150b77fa281..aae22283b5e0 100644
--- a/arch/hexagon/kernel/vmlinux.lds.S
+++ b/arch/hexagon/kernel/vmlinux.lds.S
@@ -62,6 +62,7 @@ SECTIONS
 
 	STABS_DEBUG
 	DWARF_DEBUG
+	MODINFO
 	ELF_DETAILS
 	.hexagon.attributes 0 : { *(.hexagon.attributes) }
 
diff --git a/arch/loongarch/kernel/vmlinux.lds.S b/arch/loongarch/kernel/vmlinux.lds.S
index 08ea921cdec1..d0e1377a041d 100644
--- a/arch/loongarch/kernel/vmlinux.lds.S
+++ b/arch/loongarch/kernel/vmlinux.lds.S
@@ -147,6 +147,7 @@ SECTIONS
 
 	STABS_DEBUG
 	DWARF_DEBUG
+	MODINFO
 	ELF_DETAILS
 
 #ifdef CONFIG_EFI_STUB
diff --git a/arch/m68k/kernel/vmlinux-nommu.lds b/arch/m68k/kernel/vmlinux-nommu.lds
index 2624fc18c131..45d7f4b0177b 100644
--- a/arch/m68k/kernel/vmlinux-nommu.lds
+++ b/arch/m68k/kernel/vmlinux-nommu.lds
@@ -85,6 +85,7 @@ SECTIONS {
 	_end = .;
 
 	STABS_DEBUG
+	MODINFO
 	ELF_DETAILS
 
 	/* Sections to be discarded */
diff --git a/arch/m68k/kernel/vmlinux-std.lds b/arch/m68k/kernel/vmlinux-std.lds
index 1ccdd04ae462..7326586afe15 100644
--- a/arch/m68k/kernel/vmlinux-std.lds
+++ b/arch/m68k/kernel/vmlinux-std.lds
@@ -58,6 +58,7 @@ SECTIONS
   _end = . ;
 
   STABS_DEBUG
+  MODINFO
   ELF_DETAILS
 
   /* Sections to be discarded */
diff --git a/arch/m68k/kernel/vmlinux-sun3.lds b/arch/m68k/kernel/vmlinux-sun3.lds
index f13ddcc2af5c..1b19fef201fb 100644
--- a/arch/m68k/kernel/vmlinux-sun3.lds
+++ b/arch/m68k/kernel/vmlinux-sun3.lds
@@ -51,6 +51,7 @@ __init_begin = .;
   _end = . ;
 
   STABS_DEBUG
+  MODINFO
   ELF_DETAILS
 
   /* Sections to be discarded */
diff --git a/arch/mips/kernel/vmlinux.lds.S b/arch/mips/kernel/vmlinux.lds.S
index 2b708fac8d2c..579b2cc1995a 100644
--- a/arch/mips/kernel/vmlinux.lds.S
+++ b/arch/mips/kernel/vmlinux.lds.S
@@ -217,6 +217,7 @@ SECTIONS
 
 	STABS_DEBUG
 	DWARF_DEBUG
+	MODINFO
 	ELF_DETAILS
 
 	/* These must appear regardless of  .  */
diff --git a/arch/nios2/kernel/vmlinux.lds.S b/arch/nios2/kernel/vmlinux.lds.S
index 37b958055064..206f92445bfa 100644
--- a/arch/nios2/kernel/vmlinux.lds.S
+++ b/arch/nios2/kernel/vmlinux.lds.S
@@ -57,6 +57,7 @@ SECTIONS
 
 	STABS_DEBUG
 	DWARF_DEBUG
+	MODINFO
 	ELF_DETAILS
 
 	DISCARDS
diff --git a/arch/openrisc/kernel/vmlinux.lds.S b/arch/openrisc/kernel/vmlinux.lds.S
index 049bff45f612..9b29c3211774 100644
--- a/arch/openrisc/kernel/vmlinux.lds.S
+++ b/arch/openrisc/kernel/vmlinux.lds.S
@@ -101,6 +101,7 @@ SECTIONS
 	/* Throw in the debugging sections */
 	STABS_DEBUG
 	DWARF_DEBUG
+	MODINFO
 	ELF_DETAILS
 
         /* Sections to be discarded -- must be last */
diff --git a/arch/parisc/boot/compressed/vmlinux.lds.S b/arch/parisc/boot/compressed/vmlinux.lds.S
index ab7b43990857..87d24cc824b6 100644
--- a/arch/parisc/boot/compressed/vmlinux.lds.S
+++ b/arch/parisc/boot/compressed/vmlinux.lds.S
@@ -90,6 +90,7 @@ SECTIONS
 	/* Sections to be discarded */
 	DISCARDS
 	/DISCARD/ : {
+		*(.modinfo)
 #ifdef CONFIG_64BIT
 		/* temporary hack until binutils is fixed to not emit these
 		 * for static binaries
diff --git a/arch/parisc/kernel/vmlinux.lds.S b/arch/parisc/kernel/vmlinux.lds.S
index b445e47903cf..0ca93d6d7235 100644
--- a/arch/parisc/kernel/vmlinux.lds.S
+++ b/arch/parisc/kernel/vmlinux.lds.S
@@ -165,6 +165,7 @@ SECTIONS
 	_end = . ;
 
 	STABS_DEBUG
+	MODINFO
 	ELF_DETAILS
 	.note 0 : { *(.note) }
 
diff --git a/arch/powerpc/kernel/vmlinux.lds.S b/arch/powerpc/kernel/vmlinux.lds.S
index 15850296c0a9..8fc11d6565bf 100644
--- a/arch/powerpc/kernel/vmlinux.lds.S
+++ b/arch/powerpc/kernel/vmlinux.lds.S
@@ -397,6 +397,7 @@ SECTIONS
 	_end = . ;
 
 	DWARF_DEBUG
+	MODINFO
 	ELF_DETAILS
 
 	DISCARDS
diff --git a/arch/riscv/kernel/vmlinux.lds.S b/arch/riscv/kernel/vmlinux.lds.S
index 61bd5ba6680a..997f9eb3b22b 100644
--- a/arch/riscv/kernel/vmlinux.lds.S
+++ b/arch/riscv/kernel/vmlinux.lds.S
@@ -170,6 +170,7 @@ SECTIONS
 
 	STABS_DEBUG
 	DWARF_DEBUG
+	MODINFO
 	ELF_DETAILS
 	.riscv.attributes 0 : { *(.riscv.attributes) }
 
diff --git a/arch/s390/kernel/vmlinux.lds.S b/arch/s390/kernel/vmlinux.lds.S
index 53bcbb91bb9b..2b62395e35bf 100644
--- a/arch/s390/kernel/vmlinux.lds.S
+++ b/arch/s390/kernel/vmlinux.lds.S
@@ -221,6 +221,7 @@ SECTIONS
 	/* Debugging sections.	*/
 	STABS_DEBUG
 	DWARF_DEBUG
+	MODINFO
 	ELF_DETAILS
 
 	/*
diff --git a/arch/sh/kernel/vmlinux.lds.S b/arch/sh/kernel/vmlinux.lds.S
index 008c30289eaa..169c63fb3c1d 100644
--- a/arch/sh/kernel/vmlinux.lds.S
+++ b/arch/sh/kernel/vmlinux.lds.S
@@ -89,6 +89,7 @@ SECTIONS
 
 	STABS_DEBUG
 	DWARF_DEBUG
+	MODINFO
 	ELF_DETAILS
 
 	DISCARDS
diff --git a/arch/sparc/kernel/vmlinux.lds.S b/arch/sparc/kernel/vmlinux.lds.S
index f1b86eb30340..7ea510d9b42f 100644
--- a/arch/sparc/kernel/vmlinux.lds.S
+++ b/arch/sparc/kernel/vmlinux.lds.S
@@ -191,6 +191,7 @@ SECTIONS
 
 	STABS_DEBUG
 	DWARF_DEBUG
+	MODINFO
 	ELF_DETAILS
 
 	DISCARDS
diff --git a/arch/um/kernel/dyn.lds.S b/arch/um/kernel/dyn.lds.S
index a36b7918a011..ad3cefeff2ac 100644
--- a/arch/um/kernel/dyn.lds.S
+++ b/arch/um/kernel/dyn.lds.S
@@ -172,6 +172,7 @@ SECTIONS
 
   STABS_DEBUG
   DWARF_DEBUG
+  MODINFO
   ELF_DETAILS
 
   DISCARDS
diff --git a/arch/um/kernel/uml.lds.S b/arch/um/kernel/uml.lds.S
index a409d4b66114..30aa24348d60 100644
--- a/arch/um/kernel/uml.lds.S
+++ b/arch/um/kernel/uml.lds.S
@@ -113,6 +113,7 @@ SECTIONS
 
   STABS_DEBUG
   DWARF_DEBUG
+  MODINFO
   ELF_DETAILS
 
   DISCARDS
diff --git a/arch/x86/boot/compressed/vmlinux.lds.S b/arch/x86/boot/compressed/vmlinux.lds.S
index 587ce3e7c504..e0b152715d9c 100644
--- a/arch/x86/boot/compressed/vmlinux.lds.S
+++ b/arch/x86/boot/compressed/vmlinux.lds.S
@@ -88,7 +88,7 @@ SECTIONS
 	/DISCARD/ : {
 		*(.dynamic) *(.dynsym) *(.dynstr) *(.dynbss)
 		*(.hash) *(.gnu.hash)
-		*(.note.*)
+		*(.note.*) *(.modinfo)
 	}
 
 	.got.plt (INFO) : {
diff --git a/arch/x86/kernel/vmlinux.lds.S b/arch/x86/kernel/vmlinux.lds.S
index 3a24a3fc55f5..4711a35e706c 100644
--- a/arch/x86/kernel/vmlinux.lds.S
+++ b/arch/x86/kernel/vmlinux.lds.S
@@ -427,6 +427,7 @@ SECTIONS
 	.llvm_bb_addr_map : { *(.llvm_bb_addr_map) }
 #endif
 
+	MODINFO
 	ELF_DETAILS
 
 	DISCARDS
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index eeb070f330bd..1e1580febe4b 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -848,12 +848,14 @@
 
 /* Required sections not related to debugging. */
 #define ELF_DETAILS							\
-		.modinfo : { *(.modinfo) . = ALIGN(8); }		\
 		.comment 0 : { *(.comment) }				\
 		.symtab 0 : { *(.symtab) }				\
 		.strtab 0 : { *(.strtab) }				\
 		.shstrtab 0 : { *(.shstrtab) }
 
+#define MODINFO								\
+		.modinfo : { *(.modinfo) . = ALIGN(8); }
+
 #ifdef CONFIG_GENERIC_BUG
 #define BUG_TABLE							\
 	. = ALIGN(8);							\

---
base-commit: 6de23f81a5e08be8fbf5e8d7e9febc72a5b5f27f
change-id: 20260224-separate-modinfo-from-elf-details-d3160da5f399

Best regards,
--  
Nathan Chancellor <nathan@kernel.org>


_______________________________________________
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH] kbuild: Split .modinfo out from ELF_DETAILS
  2026-02-25 22:02 ` Nathan Chancellor
  (?)
  (?)
@ 2026-02-26 11:10 ` kernel test robot
  2026-02-26 18:48   ` Nathan Chancellor
  -1 siblings, 1 reply; 9+ messages in thread
From: kernel test robot @ 2026-02-26 11:10 UTC (permalink / raw)
  To: Nathan Chancellor, Nicolas Schier
  Cc: oe-kbuild-all, Richard Henderson, Matt Turner, Magnus Lindholm,
	Vineet Gupta, Catalin Marinas, Will Deacon, Guo Ren, Brian Cain,
	Huacai Chen, WANG Xuerui, Geert Uytterhoeven, Sam Creasey,
	Thomas Bogendoerfer, Dinh Nguyen, Jonas Bonn, Stefan Kristiansson,
	Stafford Horne, James E.J. Bottomley, Helge Deller,
	Madhavan Srinivasan, Michael Ellerman, Nicholas Piggin,
	Christophe Leroy (CS GROUP), Paul Walmsley, Palmer Dabbelt,
	Albert Ou, Alexandre Ghiti, Heiko Carstens

Hi Nathan,

kernel test robot noticed the following build warnings:

[auto build test WARNING on 6de23f81a5e08be8fbf5e8d7e9febc72a5b5f27f]

url:    https://github.com/intel-lab-lkp/linux/commits/Nathan-Chancellor/kbuild-Split-modinfo-out-from-ELF_DETAILS/20260226-060503
base:   6de23f81a5e08be8fbf5e8d7e9febc72a5b5f27f
patch link:    https://lore.kernel.org/r/20260225-separate-modinfo-from-elf-details-v1-1-387ced6baf4b%40kernel.org
patch subject: [PATCH] kbuild: Split .modinfo out from ELF_DETAILS
config: arm-randconfig-003-20260226 (https://download.01.org/0day-ci/archive/20260226/202602261957.dducGrGl-lkp@intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 10.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260226/202602261957.dducGrGl-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202602261957.dducGrGl-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `kernel/workqueue.o' being placed in section `.modinfo'
>> arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `kernel/locking/locktorture.o' being placed in section `.modinfo'
>> arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `kernel/locking/test-ww_mutex.o' being placed in section `.modinfo'
>> arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `kernel/printk/printk.o' being placed in section `.modinfo'
>> arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `kernel/irq/spurious.o' being placed in section `.modinfo'
>> arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `kernel/rcu/update.o' being placed in section `.modinfo'
>> arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `kernel/rcu/rcutorture.o' being placed in section `.modinfo'
>> arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `kernel/dma/map_benchmark.o' being placed in section `.modinfo'
>> arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `kernel/module/main.o' being placed in section `.modinfo'
>> arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `kernel/time/test_udelay.o' being placed in section `.modinfo'
>> arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `kernel/configs.o' being placed in section `.modinfo'
>> arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `kernel/torture.o' being placed in section `.modinfo'
>> arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `kernel/scftorture.o' being placed in section `.modinfo'
>> arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `mm/dmapool_test.o' being placed in section `.modinfo'
>> arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `mm/page_reporting.o' being placed in section `.modinfo'
>> arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `fs/crypto/crypto.o' being placed in section `.modinfo'
>> arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `fs/binfmt_misc.o' being placed in section `.modinfo'
>> arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `fs/mbcache.o' being placed in section `.modinfo'
>> arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `fs/configfs/mount.o' being placed in section `.modinfo'
>> arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `fs/ext4/super.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `fs/jbd2/journal.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `fs/fat/inode.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `fs/fat/namei_vfat.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `fs/fat/namei_msdos.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `fs/exfat/super.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `fs/exportfs/expfs.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `fs/nls/nls_base.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `fs/nls/nls_cp437.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `fs/nls/nls_cp850.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `fs/nls/nls_cp861.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `fs/nls/nls_cp864.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `fs/nls/nls_cp932.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `fs/nls/nls_euc-jp.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `fs/nls/nls_cp936.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `fs/nls/nls_cp950.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `fs/nls/nls_cp1251.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `fs/nls/nls_ascii.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `fs/nls/nls_iso8859-4.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `fs/nls/nls_iso8859-5.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `fs/nls/nls_iso8859-6.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `fs/nls/nls_cp1255.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `fs/nls/mac-centeuro.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `fs/nls/mac-croatian.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `fs/nls/mac-cyrillic.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `fs/nls/mac-iceland.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `fs/nls/mac-turkish.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `fs/unicode/utf8data.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `fs/ntfs3/super.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `fs/nilfs2/super.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `fs/debugfs/inode.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `fs/btrfs/super.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `fs/btrfs/sysfs.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `fs/gfs2/main.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `fs/gfs2/ops_fstype.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `fs/zonefs/super.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `crypto/api.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `crypto/algapi.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `crypto/aead.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `crypto/geniv.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `crypto/skcipher.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `crypto/bpf_crypto_skcipher.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `crypto/seqiv.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `crypto/echainiv.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `crypto/ahash.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `crypto/shash.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `crypto/akcipher.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `crypto/sig.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `crypto/kpp.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `crypto/rsa.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `crypto/rsa-pkcs1pad.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `crypto/rsassa-pkcs1.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `crypto/acompress.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `crypto/scompress.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `crypto/algboss.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `crypto/testmgr.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `crypto/hmac.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `crypto/xcbc.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `crypto/sha256.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `crypto/sha512.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `crypto/sha3.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `crypto/streebog_generic.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `crypto/ecb.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `crypto/cbc.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `crypto/cts.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `crypto/xts.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `crypto/chacha20poly1305.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `crypto/aegis128-core.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `crypto/blowfish_generic.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `crypto/blowfish_common.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `crypto/aes.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `crypto/cast_common.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `crypto/cast5_generic.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `crypto/cast6_generic.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `crypto/chacha.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `crypto/deflate.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `crypto/crc32c.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `crypto/authenc.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `crypto/authencesn.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `crypto/rng.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `crypto/drbg.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `crypto/jitterentropy-kcapi.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `crypto/zstd.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `crypto/ecc.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `crypto/ecdh.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `crypto/ecrdsa.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `crypto/xor.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `block/bsg.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `block/blk-cgroup.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `block/mq-deadline.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `block/kyber-iosched.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `block/bfq-iosched.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `block/blk-crypto.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `block/blk-crypto-fallback.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `lib/test_hexdump.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `lib/find_bit_benchmark.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `lib/dhry_run.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `lib/test_firmware.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `lib/test-kstrtox.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `lib/test_xarray.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `lib/test_free_pages.o' being placed in section `.modinfo'

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] kbuild: Split .modinfo out from ELF_DETAILS
  2026-02-25 22:02 ` Nathan Chancellor
                   ` (2 preceding siblings ...)
  (?)
@ 2026-02-26 13:03 ` kernel test robot
  -1 siblings, 0 replies; 9+ messages in thread
From: kernel test robot @ 2026-02-26 13:03 UTC (permalink / raw)
  To: Nathan Chancellor, Nicolas Schier
  Cc: oe-kbuild-all, Richard Henderson, Matt Turner, Magnus Lindholm,
	Vineet Gupta, Catalin Marinas, Will Deacon, Guo Ren, Brian Cain,
	Huacai Chen, WANG Xuerui, Geert Uytterhoeven, Sam Creasey,
	Thomas Bogendoerfer, Dinh Nguyen, Jonas Bonn, Stefan Kristiansson,
	Stafford Horne, James E.J. Bottomley, Helge Deller,
	Madhavan Srinivasan, Michael Ellerman, Nicholas Piggin,
	Christophe Leroy (CS GROUP), Paul Walmsley, Palmer Dabbelt,
	Albert Ou, Alexandre Ghiti, Heiko Carstens

Hi Nathan,

kernel test robot noticed the following build warnings:

[auto build test WARNING on 6de23f81a5e08be8fbf5e8d7e9febc72a5b5f27f]

url:    https://github.com/intel-lab-lkp/linux/commits/Nathan-Chancellor/kbuild-Split-modinfo-out-from-ELF_DETAILS/20260226-060503
base:   6de23f81a5e08be8fbf5e8d7e9febc72a5b5f27f
patch link:    https://lore.kernel.org/r/20260225-separate-modinfo-from-elf-details-v1-1-387ced6baf4b%40kernel.org
patch subject: [PATCH] kbuild: Split .modinfo out from ELF_DETAILS
config: arm-mvebu_v5_defconfig (https://download.01.org/0day-ci/archive/20260226/202602262019.OY1RduM2-lkp@intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 15.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260226/202602262019.OY1RduM2-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202602262019.OY1RduM2-lkp@intel.com/

All warnings (new ones prefixed by >>):

   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `kernel/workqueue.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `kernel/printk/printk.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `kernel/irq/spurious.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `kernel/rcu/update.o' being placed in section `.modinfo'
>> arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `kernel/rcu/srcutree.o' being placed in section `.modinfo'
>> arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `kernel/rcu/tree.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `kernel/module/main.o' being placed in section `.modinfo'
>> arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `mm/slab_common.o' being placed in section `.modinfo'
>> arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `fs/binfmt_script.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `fs/mbcache.o' being placed in section `.modinfo'
>> arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `fs/nfs_common/grace.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `fs/ext4/super.o' being placed in section `.modinfo'
>> arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `fs/ext2/super.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `fs/jbd2/journal.o' being placed in section `.modinfo'
>> arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `fs/cramfs/inode.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `fs/fat/inode.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `fs/fat/namei_vfat.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `fs/fat/namei_msdos.o' being placed in section `.modinfo'
>> arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `fs/nfs/dir.o' being placed in section `.modinfo'
>> arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `fs/nfs/inode.o' being placed in section `.modinfo'
>> arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `fs/nfs/namespace.o' being placed in section `.modinfo'
>> arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `fs/nfs/fs_context.o' being placed in section `.modinfo'
>> arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `fs/nfs/nfs3super.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `fs/exportfs/expfs.o' being placed in section `.modinfo'
>> arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `fs/lockd/svc.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `fs/nls/nls_base.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `fs/nls/nls_cp437.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `fs/nls/nls_cp850.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `fs/nls/nls_iso8859-1.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `fs/nls/nls_iso8859-2.o' being placed in section `.modinfo'
>> arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `fs/nls/nls_utf8.o' being placed in section `.modinfo'
>> arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `fs/jffs2/super.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `fs/debugfs/inode.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `crypto/api.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `crypto/algapi.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `crypto/aead.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `crypto/skcipher.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `crypto/ahash.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `crypto/shash.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `crypto/akcipher.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `crypto/sig.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `crypto/kpp.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `crypto/rsa.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `crypto/rsa-pkcs1pad.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `crypto/rsassa-pkcs1.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `crypto/acompress.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `crypto/scompress.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `crypto/algboss.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `crypto/testmgr.o' being placed in section `.modinfo'
>> arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `crypto/cmac.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `crypto/sha256.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `crypto/ecb.o' being placed in section `.modinfo'
>> arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `crypto/ctr.o' being placed in section `.modinfo'
>> arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `crypto/gcm.o' being placed in section `.modinfo'
>> arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `crypto/ccm.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `crypto/aes.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `crypto/rng.o' being placed in section `.modinfo'
>> arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `crypto/ghash-generic.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `crypto/asymmetric_keys/public_key.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `crypto/asymmetric_keys/x509_public_key.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `crypto/asymmetric_keys/pkcs7_parser.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `block/mq-deadline.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `block/kyber-iosched.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `block/bfq-iosched.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `lib/math/rational.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `lib/crc/crc16.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `lib/crc/crc32-main.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `lib/crypto/utils.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `lib/crypto/aes.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `lib/crypto/arc4.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `lib/crypto/gf128mul.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `lib/crypto/blake2s.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `lib/crypto/des.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `lib/crypto/sha256.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `lib/crypto/mpi/mpiutil.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `lib/bitrev.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `lib/linear_ranges.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `lib/zlib_inflate/inflate_syms.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `lib/zlib_deflate/deflate_syms.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `lib/glob.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `lib/dim/dim.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `lib/asn1_decoder.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `lib/oid_registry.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `drivers/bus/simple-pm-bus.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `drivers/phy/marvell/phy-mvebu-a3700-utmi.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `drivers/gpio/gpio-mvebu.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `drivers/leds/led-class.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `drivers/leds/leds-gpio.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `drivers/leds/leds-netxbig.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `drivers/leds/leds-ns2.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `drivers/leds/trigger/ledtrig-timer.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `drivers/leds/trigger/ledtrig-heartbeat.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `drivers/leds/trigger/ledtrig-default-on.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `drivers/pci/controller/pci-mvebu.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `drivers/video/fbdev/core/fbmem.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `drivers/regulator/fixed.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `drivers/tty/n_null.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `drivers/tty/pty.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `drivers/tty/sysrq.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `drivers/tty/vt/keyboard.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `drivers/tty/vt/vt.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `drivers/tty/serial/serial_core.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `drivers/tty/serial/serial_base_bus.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `drivers/tty/serial/serial_ctrl.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `drivers/tty/serial/serial_port.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `drivers/tty/serial/8250/8250_core.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `drivers/tty/serial/8250/8250_platform.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `drivers/tty/serial/8250/8250_port.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `drivers/tty/serial/8250/8250_pcilib.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `drivers/tty/serial/8250/8250_exar.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `drivers/tty/serial/8250/8250_fsl.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `drivers/tty/serial/8250/8250_of.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `drivers/tty/serial/8250/8250_pci.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `drivers/tty/serial/8250/8250_pericom.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `drivers/tty/serial/serial_mctrl_gpio.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `drivers/char/random.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `drivers/base/firmware_loader/main.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `drivers/base/regmap/regmap-i2c.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `drivers/base/regmap/regmap-spi.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `drivers/base/regmap/regmap-mmio.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `drivers/block/loop.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `drivers/misc/eeprom/at24.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `drivers/misc/eeprom/eeprom_93cx6.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `drivers/scsi/scsi.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `drivers/scsi/hosts.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `drivers/scsi/scsi_scan.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `drivers/scsi/scsi_devinfo.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `drivers/scsi/scsi_common.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `drivers/scsi/sd.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `drivers/ata/libata-core.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `drivers/ata/ahci.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `drivers/ata/libahci.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `drivers/ata/sata_mv.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `drivers/mtd/mtdcore.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `drivers/mtd/mtdconcat.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `drivers/mtd/mtdchar.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `drivers/mtd/parsers/cmdlinepart.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `drivers/mtd/parsers/ofpart_core.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `drivers/mtd/mtd_blkdevs.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `drivers/mtd/mtdblock.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `drivers/mtd/chips/chipreg.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `drivers/mtd/chips/cfi_probe.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `drivers/mtd/chips/cfi_util.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `drivers/mtd/chips/cfi_cmdset_0020.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `drivers/mtd/chips/cfi_cmdset_0001.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `drivers/mtd/chips/gen_probe.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `drivers/mtd/chips/jedec_probe.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `drivers/mtd/maps/physmap-core.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `drivers/mtd/nand/core.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `drivers/mtd/nand/ecc.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `drivers/mtd/nand/ecc-sw-hamming.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `drivers/mtd/nand/raw/nand_base.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `drivers/mtd/nand/raw/orion_nand.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `drivers/mtd/spi-nor/core.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `drivers/spi/spi-orion.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `drivers/net/phy/mdio_bus.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `drivers/net/phy/phylink.o' being placed in section `.modinfo'
   arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `drivers/net/phy/phy_device.o' being placed in section `.modinfo'

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] kbuild: Split .modinfo out from ELF_DETAILS
  2026-02-26 11:10 ` kernel test robot
@ 2026-02-26 18:48   ` Nathan Chancellor
  0 siblings, 0 replies; 9+ messages in thread
From: Nathan Chancellor @ 2026-02-26 18:48 UTC (permalink / raw)
  To: kernel test robot
  Cc: Nicolas Schier, oe-kbuild-all, Richard Henderson, Matt Turner,
	Magnus Lindholm, Vineet Gupta, Catalin Marinas, Will Deacon,
	Guo Ren, Brian Cain, Huacai Chen, WANG Xuerui, Geert Uytterhoeven,
	Sam Creasey, Thomas Bogendoerfer, Dinh Nguyen, Jonas Bonn,
	Stefan Kristiansson, Stafford Horne, James E.J. Bottomley,
	Helge Deller, Madhavan Srinivasan, Michael Ellerman,
	Nicholas Piggin, Christophe Leroy (CS GROUP), Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Alexandre Ghiti, Heiko Carstens

On Thu, Feb 26, 2026 at 07:10:23PM +0800, kernel test robot wrote:
> Hi Nathan,
> 
> kernel test robot noticed the following build warnings:
> 
> [auto build test WARNING on 6de23f81a5e08be8fbf5e8d7e9febc72a5b5f27f]
> 
> url:    https://github.com/intel-lab-lkp/linux/commits/Nathan-Chancellor/kbuild-Split-modinfo-out-from-ELF_DETAILS/20260226-060503
> base:   6de23f81a5e08be8fbf5e8d7e9febc72a5b5f27f
> patch link:    https://lore.kernel.org/r/20260225-separate-modinfo-from-elf-details-v1-1-387ced6baf4b%40kernel.org
> patch subject: [PATCH] kbuild: Split .modinfo out from ELF_DETAILS
> config: arm-randconfig-003-20260226 (https://download.01.org/0day-ci/archive/20260226/202602261957.dducGrGl-lkp@intel.com/config)
> compiler: arm-linux-gnueabi-gcc (GCC) 10.5.0
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260226/202602261957.dducGrGl-lkp@intel.com/reproduce)
> 
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <lkp@intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202602261957.dducGrGl-lkp@intel.com/
> 
> All warnings (new ones prefixed by >>):
> 
> >> arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `kernel/workqueue.o' being placed in section `.modinfo'
> >> arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `kernel/locking/locktorture.o' being placed in section `.modinfo'
> >> arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `kernel/locking/test-ww_mutex.o' being placed in section `.modinfo'
> >> arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `kernel/printk/printk.o' being placed in section `.modinfo'
> >> arm-linux-gnueabi-ld: warning: orphan section `.modinfo' from `kernel/irq/spurious.o' being placed in section `.modinfo'

Whoops, I missed arch/arm because ELF_DETAILS is in ARM_DETAILS and I
wasn't paying attention... I will squash the following change.

Cheers,
Nathan

diff --git a/arch/arm/boot/compressed/vmlinux.lds.S b/arch/arm/boot/compressed/vmlinux.lds.S
index d411abd4310e..2d916647df03 100644
--- a/arch/arm/boot/compressed/vmlinux.lds.S
+++ b/arch/arm/boot/compressed/vmlinux.lds.S
@@ -21,6 +21,7 @@ SECTIONS
     COMMON_DISCARDS
     *(.ARM.exidx*)
     *(.ARM.extab*)
+    *(.modinfo)
     *(.note.*)
     *(.rel.*)
     *(.printk_index)
diff --git a/arch/arm/kernel/vmlinux-xip.lds.S b/arch/arm/kernel/vmlinux-xip.lds.S
index f2e8d4fac068..5afb725998ec 100644
--- a/arch/arm/kernel/vmlinux-xip.lds.S
+++ b/arch/arm/kernel/vmlinux-xip.lds.S
@@ -154,6 +154,7 @@ SECTIONS
 
 	STABS_DEBUG
 	DWARF_DEBUG
+	MODINFO
 	ARM_DETAILS
 
 	ARM_ASSERTS
diff --git a/arch/arm/kernel/vmlinux.lds.S b/arch/arm/kernel/vmlinux.lds.S
index d592a203f9c6..c07843c3c53d 100644
--- a/arch/arm/kernel/vmlinux.lds.S
+++ b/arch/arm/kernel/vmlinux.lds.S
@@ -153,6 +153,7 @@ SECTIONS
 
 	STABS_DEBUG
 	DWARF_DEBUG
+	MODINFO
 	ARM_DETAILS
 
 	ARM_ASSERTS

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH] kbuild: Split .modinfo out from ELF_DETAILS
  2026-02-25 22:02 ` Nathan Chancellor
  (?)
@ 2026-03-05  0:36   ` Nathan Chancellor
  -1 siblings, 0 replies; 9+ messages in thread
From: Nathan Chancellor @ 2026-03-05  0:36 UTC (permalink / raw)
  To: Nicolas Schier, Nathan Chancellor
  Cc: Richard Henderson, Matt Turner, Magnus Lindholm, Vineet Gupta,
	Catalin Marinas, Will Deacon, Guo Ren, Brian Cain, Huacai Chen,
	WANG Xuerui, Geert Uytterhoeven, Sam Creasey, Thomas Bogendoerfer,
	Dinh Nguyen, Jonas Bonn, Stefan Kristiansson, Stafford Horne,
	James E.J. Bottomley, Helge Deller, Madhavan Srinivasan,
	Michael Ellerman, Nicholas Piggin, Christophe Leroy (CS GROUP),
	Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti,
	Heiko Carstens, Vasily Gorbik, Alexander Gordeev,
	Christian Borntraeger, Sven Schnelle, Yoshinori Sato, Rich Felker,
	John Paul Adrian Glaubitz, David S. Miller, Andreas Larsson,
	Richard Weinberger, Anton Ivanov, Johannes Berg, Thomas Gleixner,
	Ingo Molnar, Borislav Petkov, Dave Hansen, x86, H. Peter Anvin,
	Kees Cook, Arnd Bergmann, Masahiro Yamada, Alexey Gladkov,
	linux-alpha, linux-kernel, linux-snps-arc, linux-arm-kernel,
	linux-csky, linux-hexagon, loongarch, linux-m68k, linux-mips,
	linux-openrisc, linux-parisc, linuxppc-dev, linux-riscv,
	linux-s390, linux-sh, sparclinux, linux-um, linux-kbuild, stable,
	Ed W

On Wed, 25 Feb 2026 15:02:51 -0700, Nathan Chancellor wrote:
> Commit 3e86e4d74c04 ("kbuild: keep .modinfo section in
> vmlinux.unstripped") added .modinfo to ELF_DETAILS while removing it
> from 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 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].
> 
> [...]

Applied to

  https://git.kernel.org/pub/scm/linux/kernel/git/kbuild/linux.git kbuild-fixes

Thanks!

[1/1] kbuild: Split .modinfo out from ELF_DETAILS
      https://git.kernel.org/kbuild/c/8678591b47469

Please look out for regression or issue reports or other follow up
comments, as they may result in the patch/series getting dropped or
reverted. Patches applied to an "unstable" branch are accepted pending
wider testing in -next and any post-commit review; they will generally
be moved to the main branch in a week if no issues are found.

Best regards,
-- 
Nathan Chancellor <nathan@kernel.org>


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] kbuild: Split .modinfo out from ELF_DETAILS
@ 2026-03-05  0:36   ` Nathan Chancellor
  0 siblings, 0 replies; 9+ messages in thread
From: Nathan Chancellor @ 2026-03-05  0:36 UTC (permalink / raw)
  To: Nicolas Schier, Nathan Chancellor
  Cc: Richard Henderson, Matt Turner, Magnus Lindholm, Vineet Gupta,
	Catalin Marinas, Will Deacon, Guo Ren, Brian Cain, Huacai Chen,
	WANG Xuerui, Geert Uytterhoeven, Sam Creasey, Thomas Bogendoerfer,
	Dinh Nguyen, Jonas Bonn, Stefan Kristiansson, Stafford Horne,
	James E.J. Bottomley, Helge Deller, Madhavan Srinivasan,
	Michael Ellerman, Nicholas Piggin, Christophe Leroy (CS GROUP),
	Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti,
	Heiko Carstens, Vasily Gorbik, Alexander Gordeev,
	Christian Borntraeger, Sven Schnelle, Yoshinori Sato, Rich Felker,
	John Paul Adrian Glaubitz, David S. Miller, Andreas Larsson,
	Richard Weinberger, Anton Ivanov, Johannes Berg, Thomas Gleixner,
	Ingo Molnar, Borislav Petkov, Dave Hansen, x86, H. Peter Anvin,
	Kees Cook, Arnd Bergmann, Masahiro Yamada, Alexey Gladkov,
	linux-alpha, linux-kernel, linux-snps-arc, linux-arm-kernel,
	linux-csky, linux-hexagon, loongarch, linux-m68k, linux-mips,
	linux-openrisc, linux-parisc, linuxppc-dev, linux-riscv,
	linux-s390, linux-sh, sparclinux, linux-um, linux-kbuild, stable,
	Ed W

On Wed, 25 Feb 2026 15:02:51 -0700, Nathan Chancellor wrote:
> Commit 3e86e4d74c04 ("kbuild: keep .modinfo section in
> vmlinux.unstripped") added .modinfo to ELF_DETAILS while removing it
> from 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 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].
> 
> [...]

Applied to

  https://git.kernel.org/pub/scm/linux/kernel/git/kbuild/linux.git kbuild-fixes

Thanks!

[1/1] kbuild: Split .modinfo out from ELF_DETAILS
      https://git.kernel.org/kbuild/c/8678591b47469

Please look out for regression or issue reports or other follow up
comments, as they may result in the patch/series getting dropped or
reverted. Patches applied to an "unstable" branch are accepted pending
wider testing in -next and any post-commit review; they will generally
be moved to the main branch in a week if no issues are found.

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] 9+ messages in thread

* Re: [PATCH] kbuild: Split .modinfo out from ELF_DETAILS
@ 2026-03-05  0:36   ` Nathan Chancellor
  0 siblings, 0 replies; 9+ messages in thread
From: Nathan Chancellor @ 2026-03-05  0:36 UTC (permalink / raw)
  To: Nicolas Schier, Nathan Chancellor
  Cc: Richard Henderson, Matt Turner, Magnus Lindholm, Vineet Gupta,
	Catalin Marinas, Will Deacon, Guo Ren, Brian Cain, Huacai Chen,
	WANG Xuerui, Geert Uytterhoeven, Sam Creasey, Thomas Bogendoerfer,
	Dinh Nguyen, Jonas Bonn, Stefan Kristiansson, Stafford Horne,
	James E.J. Bottomley, Helge Deller, Madhavan Srinivasan,
	Michael Ellerman, Nicholas Piggin, Christophe Leroy (CS GROUP),
	Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti,
	Heiko Carstens, Vasily Gorbik, Alexander Gordeev,
	Christian Borntraeger, Sven Schnelle, Yoshinori Sato, Rich Felker,
	John Paul Adrian Glaubitz, David S. Miller, Andreas Larsson,
	Richard Weinberger, Anton Ivanov, Johannes Berg, Thomas Gleixner,
	Ingo Molnar, Borislav Petkov, Dave Hansen, x86, H. Peter Anvin,
	Kees Cook, Arnd Bergmann, Masahiro Yamada, Alexey Gladkov,
	linux-alpha, linux-kernel, linux-snps-arc, linux-arm-kernel,
	linux-csky, linux-hexagon, loongarch, linux-m68k, linux-mips,
	linux-openrisc, linux-parisc, linuxppc-dev, linux-riscv,
	linux-s390, linux-sh, sparclinux, linux-um, linux-kbuild, stable,
	Ed W

On Wed, 25 Feb 2026 15:02:51 -0700, Nathan Chancellor wrote:
> Commit 3e86e4d74c04 ("kbuild: keep .modinfo section in
> vmlinux.unstripped") added .modinfo to ELF_DETAILS while removing it
> from 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 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].
> 
> [...]

Applied to

  https://git.kernel.org/pub/scm/linux/kernel/git/kbuild/linux.git kbuild-fixes

Thanks!

[1/1] kbuild: Split .modinfo out from ELF_DETAILS
      https://git.kernel.org/kbuild/c/8678591b47469

Please look out for regression or issue reports or other follow up
comments, as they may result in the patch/series getting dropped or
reverted. Patches applied to an "unstable" branch are accepted pending
wider testing in -next and any post-commit review; they will generally
be moved to the main branch in a week if no issues are found.

Best regards,
-- 
Nathan Chancellor <nathan@kernel.org>


_______________________________________________
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2026-03-05  0:36 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-25 22:02 [PATCH] kbuild: Split .modinfo out from ELF_DETAILS Nathan Chancellor
2026-02-25 22:02 ` Nathan Chancellor
2026-02-25 22:02 ` Nathan Chancellor
2026-02-26 11:10 ` kernel test robot
2026-02-26 18:48   ` Nathan Chancellor
2026-02-26 13:03 ` kernel test robot
2026-03-05  0:36 ` Nathan Chancellor
2026-03-05  0:36   ` Nathan Chancellor
2026-03-05  0:36   ` Nathan Chancellor

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.