Commit 208124d0 authored by Hatayama, Daisuke's avatar Hatayama, Daisuke Committed by Kazuhito Hagio
Browse files

[PATCH] Fix failure of detection of SPARSEMEM EXTREME in case of -x VMLINUX



This issue was introduced by commit
f3c87e0a.

Currently, is_sparsemem_extreme() compares ARRAY_LENGTH(mem_section)
with NOT_FOUND_SYMBOL but correct initial value for array table is
NOT_FOUND_STRUCTURE.

As a result, makedumpfile fails to detect SPARSEMEM EXTREME and so
fails to convert vmcore captured by sadump as follows:

    # LANG=C makedumpfile --message-level 31 -f -l -d 31 -x ./vmlinux /dev/sdc vmcore-ld31
    sadump: read dump device as single partition
    sadump: single partition configuration
    page_size    : 4096
    sadump: timezone information is missing
    sadump: idtr=fffffe0000000000
    sadump: cr3=ba4e0a000
    sadump: idtr(phys)=ba55cc000
    sadump: devide_error(vmlinux)=ffffffff81a00c50
    sadump: devide_error(vmcore)=ffffffff83c00c50
    sadump: cmdline vaddr: ffffffff84bcf008
    sadump: cmdline paddr: ba55cf008
    sadump: cmdline buf vaddr: ffff8fa39ffceec0
    sadump: cmdline buf paddr: 109ffceec0
    sadump: kaslr_offset=2200000
    sadump: phys_base=ba0a00000
    sadump: online cpus: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 [...]
    sadump: nr_cpus: 60
    The kernel version is not supported.
    The makedumpfile operation may be incomplete.
    sadump: SRC_START: 0x00000000001000 SRC_SIZE: 0x0000000009f000 SRC_OFFSET: 0x00000025f61000
    sadump: kdump backup region unused

    num of NODEs : 2

    Memory type  : SPARSEMEM

    get_mm_sparsemem: Can't get the address of mem_section.

    makedumpfile Failed.

This issue doesn't occur for vmcore captured by kdump because in that
case, the length of mem_section is provided via VMCOREINFO and
is_sparsemem_extreme() returns TRUE via the other path.

This issue occurs also for other mechanisms where we need to use
-x VMLINUX such as virsh dump.

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