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

From: Petr Pavlu

Date: Fri Jul 10 2026 - 08:39:16 EST


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 <stf_xl@xxxxx>

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

--
Thanks,
Petr