Thread (22 messages) flat view 22 messages, 2 authors, 8d ago

Re: [PATCH 07/14] module: Add module_kallsyms_on_each_core_symbol()

From: Josh Poimboeuf <jpoimboe@kernel.org>
Date: 2026-08-03 06:24:33
Also in: live-patching, lkml

On Sun, Aug 02, 2026 at 08:24:29PM -0700, Josh Poimboeuf wrote:
module_kallsyms_on_each_symbol() iterates mod->kallsyms, which points at
the full init symbol table until do_init_module() swaps it out.  The set
of symbols it reports thus differs based on whether init memory has been
freed yet.

Add module_kallsyms_on_each_core_symbol() for callers which need a
symbol's position to be the same before and after that swap.
core_kallsyms is fully populated by add_kallsyms() before the module
leaves MODULE_STATE_UNFORMED, so it's readable on both paths.

Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
NAK

The Sashiko comment made me realize this is not worth adding kernel code
for.  A duplicate symbol name between init and non-init module code is
somewhere between exceedingly rare and non-existent.  I'll submit
another patch separately which will make it a build error for now.

-- 
Josh
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help