[PATCH v2][makedumpfile 03/14] dwarf_info: Support kernel address randomization

Tao Liu ltao at redhat.com
Fri Oct 24 01:13:24 PDT 2025


Hi YAMAZAKI & Kazu,

Thank you for reviewing and ack the patch!

Thanks,
Tao Liu

On Fri, Oct 24, 2025 at 8:19 PM YAMAZAKI MASAMITSU(山崎 真光)
<yamazaki-msmt at nec.com> wrote:
>
> Liu
>
> Thanks your new patch.
> I think the patche is good.
> I ack this patch.
>
> Acked-by: YAMAZAKI Masamitsu <yamazaki-msmt at nec.com>
>
> Thanks,
> Masa
>
> On 2025/10/22 15:37, HAGIO KAZUHITO(萩尾 一仁) wrote:
> > On 2025/10/21 7:23, Tao Liu wrote:
> >> There is a bug of not supporting randomized kernel address, this patch fix it.
> >>
> >> Signed-off-by: Tao Liu <ltao at redhat.com>
> > for applying this 03/14 patch separately before the 1.7.8 release,
> >
> > Acked-by: Kazuhito Hagio <k-hagio-ab at nec.com>
> >
> > Thanks,
> > Kazu
> >
> >> ---
> >>    erase_info.c | 8 ++++----
> >>    1 file changed, 4 insertions(+), 4 deletions(-)
> >>
> >> diff --git a/erase_info.c b/erase_info.c
> >> index fd316c1..d68e1a2 100644
> >> --- a/erase_info.c
> >> +++ b/erase_info.c
> >> @@ -1881,7 +1881,7 @@ get_symbol_addr_all(char *name) {
> >>      if (!strcmp(get_dwarf_module_name(), "vmlinux")) {
> >>              symbol_addr = get_symbol_addr(name);
> >>              if (symbol_addr)
> >> -                    return symbol_addr;
> >> +                    return symbol_addr + info->kaslr_offset;
> >>
> >>              vmlinux_searched = 1;
> >>      }
> >> @@ -1942,9 +1942,9 @@ get_symbol_addr_all(char *name) {
> >>       * this function is called with debuginfo set to a particular
> >>       * kernel module and we are looking for symbol in vmlinux
> >>       */
> >> -    if (!vmlinux_searched)
> >> -            return get_symbol_addr(name);
> >> -    else
> >> +    if (!vmlinux_searched && !!(symbol_addr = get_symbol_addr(name))) {
> >> +            return symbol_addr + info->kaslr_offset;
> >> +    } else
> >>              return NOT_FOUND_SYMBOL;
> >>    }
> >>




More information about the kexec mailing list