Re: [PATCH v2 1/2] module/kallsyms: fix nextval for data symbol lookup

Petr Pavlu <[email protected]> Fri, 10 Jul 2026 14:36:43 +0200
Newsgroups org.kernel.vger.live-patching,org.kernel.vger.linux-kernel,org.kernel.vger.linux-modules,org.kernel.vger.linux-trace-kernel
Message-ID <[email protected]>
On 3/27/26 12:00 PM, Stanislaw Gruszka wrote:
> The symbol lookup code assumes the queried address resides in either
> MOD_TEXT or MOD_INIT_TEXT. This breaks for addresses in other module
> memory regions (e.g. rodata or data), resulting in incorrect upper
> bounds and wrong symbol size.
> 
> Select the module memory region the address belongs to instead of
> hardcoding text sections. Also initialize the lower bound to the start
> of that region, as searching from address 0 is unnecessary.
> 
> Signed-off-by: Stanislaw Gruszka <[email protected]>

I've queued this first patch on modules-fixes.

-- 
Thanks,
Petr