Re: [PATCH] arm64 : assign page_offset and kvbase based on VA_BITS passed

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

 



Date: Mon, 27 Sep 2021 14:29:25 +0800
From: lijiang <lijiang@xxxxxxxxxx>
To: "Discussion list for crash utility usage,   maintenance and
        development" <crash-utility@xxxxxxxxxx>
Subject: Re: [PATCH] arm64 : assign page_offset and
        kvbase  based on VA_BITS passed
Message-ID:
        <CANU+ZyffmHocjiXy1F1v7YPdRtQ+eeukXXT-PXsW2H5Q2cHEfA@xxxxxxxxxxxxxx>
Content-Type: text/plain; charset="UTF-8"

>> Date: Thu, 23 Sep 2021 01:46:31 +0530
>> From: Ankur Bansal <er.ankurbansal@xxxxxxxxx>
>> To: crash-utility@xxxxxxxxxx
>> Cc: Ankur Bansal <er.ankurbansal@xxxxxxxxx>
>> Subject: [Crash-utility] [PATCH] arm64 : assign page_offset and kvbase
>>         based   on VA_BITS passed
>> Message-ID:
>>         <1632341791-10205-1-git-send-email-er.ankurbansal@xxxxxxxxx>
>> Content-Type: text/plain; charset="US-ASCII"
>>
>> assign page_offset and kvbase based on VA_BITS passed
>>

>Thank you for the patch, Ankur.
>Can you help to describe the reason in detail? And what happened?
 
Hi Lianbo, Raw ramdump without vmcoreinfo doesn't work here.
read_vmcoreinfo("NUMBER(BA_BITS)") will not work on raw ramdump.
getting below error

crash_64: vmlinux and /var/tmp/ramdump_elf_XUtCMT do not match!
Usage:
crash [OPTION]... NAMELIST MEMORY-IMAGE[@address] (dumpfile form)
crash [OPTION]... [NAMELIST] (live system form)
Enter "crash_64 -h" for details.

Recent change https://github.com/crash-utility/crash/commit/167d37e347fe35c6f7db826e8539e192c4375564 is causing this issue, before this change VA_BITS_ACTUAL was used which is passed from cmd line.

3987 static void
3988 arm64_calc_VA_BITS(void)
3989 {
3990     int bitval;
3991     struct syment *sp;
3992     ulong vabits_actual, value;
3993     char *string;
3994
3995     if ((string = pc->read_vmcoreinfo("NUMBER(VA_BITS)"))) { 
3996         value = atol(string);
3997         free(string);
3998         machdep->machspec->CONFIG_ARM64_VA_BITS = value;
3999     }

 
>Thanks.
>Lianbo

>> Change-Id: I525f3c7fd91e1f06e909c2f4c1749c44c068baea
>> Signed-off-by: Ankur Bansal <er.ankurbansal@xxxxxxxxx>
>> ---
>> arm64.c | 15 +++++++++++----
>> 1 file changed, 11 insertions(+), 4 deletions(-)
>>
>> diff --git a/arm64.c b/arm64.c
>> index 7069312..2dc77f7 100644
>> --- a/arm64.c
>> +++ b/arm64.c
>> @@ -220,10 +220,17 @@ arm64_init(int when)
>>
>>                 /* vabits_actual introduced after mm flip, so it should be flipped layout */
>>                 if (ms->VA_BITS_ACTUAL) {
>> -                       ms->page_offset = ARM64_FLIP_PAGE_OFFSET;
>> -                       /* useless on arm64 */
>> -                       machdep->identity_map_base = ARM64_FLIP_PAGE_OFFSET;
>> -                       machdep->kvbase = ARM64_FLIP_PAGE_OFFSET;
>> +                       if ((pc->flags2 & SNAP)) {
>> +                               ms->page_offset = ARM64_FLIP_PAGE_OFFSET;
>> +                               /* useless on arm64 */
>> +                               machdep->identity_map_base = ARM64_FLIP_PAGE_OFFSET;
>> +                               machdep->kvbase = ARM64_FLIP_PAGE_OFFSET;
>> +                       }
>> +                       else{
>> +                               ms->page_offset = ARM64_FLIP_PAGE_OFFSET_ACTUAL;
>> +                               machdep->identity_map_base = ARM64_FLIP_PAGE_OFFSET_ACTUAL;
>> +                               machdep->kvbase = ARM64_FLIP_PAGE_OFFSET_ACTUAL;
>> +                       }
>>                         ms->userspace_top = ARM64_USERSPACE_TOP_ACTUAL;
>>                 } else {
>>                         ms->page_offset = ARM64_PAGE_OFFSET;
>> --
>> 2.7.4



------------------------------

--
Crash-utility mailing list
Crash-utility@xxxxxxxxxx
https://listman.redhat.com/mailman/listinfo/crash-utility

End of Crash-utility Digest, Vol 192, Issue 28
**********************************************


--
Crash-utility mailing list
Crash-utility@xxxxxxxxxx
https://listman.redhat.com/mailman/listinfo/crash-utility

[Index of Archives]     [Fedora Development]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]

 

Powered by Linux