[PATCH] makedumpfile: ppc64: do page traversal if vmemmap_list not populated

Sachin Sant sachinp at linux.ibm.com
Thu Sep 14 07:52:03 PDT 2023



> On 14-Sep-2023, at 2:52 PM, Aditya Gupta <adityag at linux.ibm.com> wrote:
> 
> Currently 'makedumpfile' fails to collect vmcore on upstream kernel,
> with the errors:
> 
>    readpage_elf: Attempt to read non-existent page at 0x4000000000000000.
>    readmem: type_addr: 0, addr:0, size:8
>    get_vmemmap_list_info: Can't get vmemmap region addresses
>    get_machdep_info_ppc64: Can't get vmemmap list info.
> 
> This occurs since makedumpfile depends on 'vmemmap_list' for translating
> vmemmap addresses. But with below commit in Linux, vmemmap_list can be
> empty, in case of Radix MMU on PowerPC64
> 
>    368a0590d954: (powerpc/book3s64/vmemmap: switch radix to use a
>    different vmemmap handling function)
> 
> In case vmemmap_list is empty, then it's head is NULL, which causes
> makedumpfile to fail with above error.
> 
> Since with above commit, 'vmemmap_list' is not populated (when MMU is
> Radix MMU), kernel populates corresponding page table entries in kernel
> page table. Hence, instead of depending on 'vmemmap_list' for address
> translation for vmemmap addresses, do a kernel pagetable walk.
> 
> And since the pte can also be introduced at higher levels in the page
> table, such as at PMD level, add hugepage support, by checking for
> PAGE_PTE flag
> 
> Reported-by: Sachin Sant <sachinp at linux.ibm.com>
> Signed-off-by: Aditya Gupta <adityag at linux.ibm.com>
>Thanks for the fix. With this (and the corresponding kernel) fix applied,
I am able to capture crash dump.

Tested-by: Sachin Sant <sachinp at linux.ibm.com>

- Sachin



More information about the kexec mailing list