[Crash-utility] [PATCH v2] ppc64: do page traversal if vmemmap_list not populated

HAGIO KAZUHITO(萩尾 一仁) k-hagio-ab at nec.com
Wed Sep 27 07:25:16 UTC 2023


On 2023/09/26 15:12, lijiang wrote:
> Hi, Aditya
> Thank you for the update.
> On Mon, Sep 25, 2023 at 5:28 PM Aditya Gupta <adityag at linux.ibm.com> wrote:
> 
>> Currently 'crash-tool' fails on vmcore collected on upstream kernel on
>> PowerPC64 with the error:
>>
>>      crash: invalid kernel virtual address: 0  type: "first list entry
>>
>> Presently the address translation for vmemmap addresses is done using
>> the vmemmap_list. But with the 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 crash tries
>> to access and fails due to accessing NULL.
>>
>> Instead of depending on 'vmemmap_list' for address translation for
>> vmemmap addresses, do a kernel pagetable walk to get the physical
>> address associated with given virtual address
>>
>> Tested-by: Sachin Sant <sachinp at linux.ibm.com>
>> Reviewed-by: Hari Bathini <hbathini at linux.ibm.com>
>> Signed-off-by: Aditya Gupta <adityag at linux.ibm.com>
>>
>> ---
>>
>> Testing
>> =======
>>
>> Git tree with patch applied:
>> https://github.com/adi-g15-ibm/crash/tree/bugzilla-203296-list-v2
>>
>> This can be tested with '/proc/vmcore' as the vmcore, since makedumpfile
>> also fails in absence of 'vmemmap_list' in upstream linux
>>
>> The fix for makedumpfile will also been sent to upstream
>>
>> Changelog
>> =========
>>
>> V2
>> + handle the case of 'vmemmap_list' symbol missing according to reviews
>>
>>
> The v2 looks good to me, so: Ack.

Looks good, and applied.
https://github.com/crash-utility/crash/commit/a9291fc1bf61309c74078f757f58c47ff887da10

Thanks,
Kazu


More information about the Crash-utility mailing list