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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Hatayama-san,

Thank you for the patch.
I merged it into the devel branch.

Kazu

On 10/24/2018 3:51 AM, Hatayama, Daisuke wrote:
> This issue was introduced by commit
> f3c87e0ab1f62b118e738d046c3d676325770418.
> 
> 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 25 26 27 28 29
> 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
>     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: HATAYAMA Daisuke <d.hatayama@xxxxxxxxxxxxxx>
> ---
>  makedumpfile.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/makedumpfile.c b/makedumpfile.c
> index 1ed3d61..18b4364 100644
> --- a/makedumpfile.c
> +++ b/makedumpfile.c
> @@ -2084,7 +2084,7 @@ is_sparsemem_extreme(void)
>  {
>  	if ((ARRAY_LENGTH(mem_section)
>  	     == divideup(NR_MEM_SECTIONS(), _SECTIONS_PER_ROOT_EXTREME()))
> -	    || (ARRAY_LENGTH(mem_section) == NOT_FOUND_SYMBOL))
> +	    || (ARRAY_LENGTH(mem_section) == NOT_FOUND_STRUCTURE))
>  		return TRUE;
>  	else
>  		return FALSE;
> --
> 2.18.0
> 
> 



_______________________________________________
kexec mailing list
kexec@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/kexec



[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux