-----Original Message-----
> Upstream kernel commit 9d06c4027f21 ("x86/entry: Convert Divide Error to 
> IDTENTRY")
> renamed divide_error handler to asm_exc_divide_error. This breaks kaslr
> offser derivation when we crash tries to open a qemu image dump. Fix it
> by also checking symbols for the presence of the new name.
> 
> Signed-off-by: Nikolay Borisov <[email protected]>

Thank you for catching this.

The divide_error way would be rarely used with Alexey's patchset, but
it's still there.  I've tested this patch with a 5.9 kernel.

Acked-by: Kazuhito Hagio <[email protected]>

(I will add "Linux 5.8 and later" to the commit message.)

Thanks,
Kazu

> ---
>  symbols.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/symbols.c b/symbols.c
> index 70b1455750ee..e3594ce0ed48 100644
> --- a/symbols.c
> +++ b/symbols.c
> @@ -12711,9 +12711,11 @@ numeric_forward(const void *P_x, const void *P_y)
> 
>       if (SADUMP_DUMPFILE() || QEMU_MEM_DUMP_NO_VMCOREINFO() || 
> VMSS_DUMPFILE()) {
>               /* Need for kaslr_offset and phys_base */
> -             if (STREQ(x->name, "divide_error"))
> +             if (STREQ(x->name, "divide_error") ||
> +                 STREQ(x->name, "asm_exc_divide_error"))
>                       st->divide_error_vmlinux = valueof(x);
> -             else if (STREQ(y->name, "divide_error"))
> +             else if (STREQ(y->name, "divide_error") ||
> +                      STREQ(y->name, "asm_exc_divide_error"))
>                       st->divide_error_vmlinux = valueof(y);
> 
>               if (STREQ(x->name, "idt_table"))
> --
> 2.25.1
> 
> 
> --
> Crash-utility mailing list
> [email protected]
> https://www.redhat.com/mailman/listinfo/crash-utility


--
Crash-utility mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/crash-utility

Reply via email to