Re: [PATCH 07/14] module: Add module_kallsyms_on_each_core_symbol()
Josh Poimboeuf <[email protected]> Sun, 2 Aug 2026 23:24:31 -0700
| Newsgroups | org.kernel.vger.linux-modules,org.kernel.vger.linux-kernel,org.kernel.vger.live-patching |
|---|---|
| Message-ID | <uujknkk2vlo5fwud2piiyt7iqjic74rx23hcqulsv2eksbse2o@4ukhz52awr2z> |
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 <[email protected]> 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