Thread (105 messages) flat view 105 messages, 14 authors, 1d ago

Re: [PATCH 01/23] scripts/mksysmap: drop the MODULE_INFO() symbols from kallsyms

From: "Lorenzo Stoakes (ARM)" <ljs@kernel.org>
Date: 2026-09-10 11:03:40
Also in: linux-arch, linux-doc, linux-efi, linux-kbuild, linux-riscv, lkml, llvm

On Wed, Sep 09, 2026 at 09:19:12PM -0700, Nathan Chancellor wrote:
quoted
Commit 3e86e4d74c04 ("kbuild: keep .modinfo section in vmlinux.unstripped")
keeps .modinfo symbols out of System.map and kallsyms, which assumes unique
IDs have a format like '__UNIQUE_ID_modinfo123'.

However, commit afb026b6d35c ("compiler: Tweak __UNIQUE_ID() naming"), sent
in the same cycle, changes this to '__UNIQUE_ID_modinfo_123'.

As a result this regexp has never matched and every kernel since v6.18 has
carried one kallsyms entries for every MODULE_INFO() declaration in the
kernel whether the modules are compiled or not.

That's 5,810 entries for an x86 defconfig build and 15,200 for arm64.

On x86 defconfig that is 113 KiB of kallsyms tables and 32 KiB of bzImage,
and every lookup walks past them.
Bummer :/
Yeah super easy to miss though I think!
quoted
Fix the pattern.

Fixes: 3e86e4d74c04 ("kbuild: keep .modinfo section in vmlinux.unstripped")

No measurable change in build time, the smaller tables are not on any path
the build waits for.
I don't think this needs to be in the commit message, it could be below
the fold, since it appears to be a valid fix on its own. Agree with
Nicolas on adjusting the Fixes tag.
Ack yeah I screwed this bit up sorry!
Is this worth Cc'ing stable for?
Yeah I wasn't sure, it's not like it breaks anything but you see stuff in
kallsyms that you shouldn't.

So I'd say probably on balance yes we should actually?
quoted
Assisted-by: LLM
Signed-off-by: Lorenzo Stoakes (ARM) <ljs@kernel.org>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Thanks!
--
Cheers,
Nathan
--
Cheers, Lorenzo
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help