Commit 59b1726f authored by HATAYAMA Daisuke's avatar HATAYAMA Daisuke Committed by Kazuhito Hagio
Browse files

[PATCH] sadump, kaslr: fix failure of calculating kaslr_offset



On kernels v5.8 or later, makedumpfile fails for memory dumps in the
sadump-related formats as follows:

    # makedumpfile -f -l -d 31 -x ./vmlinux /dev/sdd4 /root/vmcore-ld31
    __vtop4_x86_64: Can't get a valid pud_pte.
    ...110 lines of the same message...
    __vtop4_x86_64: Can't get a valid pud_pte.
    calc_kaslr_offset: failed to calculate kaslr_offset and phys_base; default to 0
    readmem: type_addr: 1, addr:ffffffff85411858, size:8
    __vtop4_x86_64: Can't get pgd (page_dir:ffffffff85411858).
    readmem: Can't convert a virtual address(ffffffff059be980) to physical address.
    readmem: type_addr: 0, addr:ffffffff059be980, size:1024
    cpu_online_mask_init: Can't read cpu_online_mask memory.

    makedumpfile Failed.

This is caused by the kernel commit 9d06c4027f21 ("x86/entry: Convert
Divide Error to IDTENTRY") that renamed divide_error to
asm_exc_divide_error, breaking logic for calculating kaslr offset.

Fix this by adding initialization of asm_exc_divide_error.

Signed-off-by: default avatarHATAYAMA Daisuke <d.hatayama@fujitsu.com>
parent e459edc9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment