[Crash-utility] [PATCH v2] arm64: fix the "pud page" crash for live system

lijiang lijiang at redhat.com
Fri Mar 25 01:52:45 UTC 2022


Hi, Kazu.

On Thu, Mar 24, 2022 at 3:01 PM HAGIO KAZUHITO(萩尾 一仁) <k-hagio-ab at nec.com>
wrote:

> -----Original Message-----
> > 1.) When I tested live system with "crash vmlinux /proc/kcore" in kernel
> v5.7,
> >     I met the following crash issue:
> >        ........................................
> >        crash: seek error: kernel virtual address: ffff75e9fffff000
> type: "pud page"
> >        ........................................
> >
> > 2.) The root cause is the PTOV does not work correctly for some kernel,
> >     and then arm64_vtop_4level_4k() does not work correctly too.
> >
> >     Why PTOV does not work?
> >
> >     Because the physvirt_offset does not get the correct value.
> >
> > 3.) This patch uses symbol_value_from_proc_kallsyms() to get the
> >     virtual address of "physvirt_offset", and then uses
> >     READMEM(,..,KCORE_USE_VADDR) to get the correct value of
> >     "physvirt_offset".
> >
> >     And also updates the ms->phys_offset which is initialized with
> >     a wrong value in kernel version [5.4, 5.10).
> >
> >     Also add more comments for arm64_calc_physvirt_offset().
> >
> > Signed-off-by: Huang Shijie <shijie at os.amperecomputing.com>
> > ---
> > v1 --> v2:
> >       v1 tried to get the correct value for phys_offset,
> >       and then get the physvirt_offset correctly.
> >
> >       v2 tried to get the physvirt_offset correctly,
> >       and them update phys_offset correctly.
> >
> >       Tested this patch with kernel 5.7.
>
> Thank you for the change.  The code looks good to me.
>
> Acked-by: Kazuhito Hagio <k-hagio-ab at nec.com>
>
> Lianbo, can we add the following with this?  it's missing in help -m.
>

Sure. This looks good, I will add the fix when merging, maybe today.
BTW: I am testing them today.

Thanks.
Lianbo

@@ -1065,6 +1065,7 @@ arm64_dump_machdep_table(ulong arg)
>                 fprintf(fp, "        kimage_voffset: %016lx\n",
> ms->kimage_voffset);
>         }
>         fprintf(fp, "           phys_offset: %lx\n", ms->phys_offset);
> +       fprintf(fp, "       physvirt_offset: %lx\n", ms->physvirt_offset);
>         fprintf(fp, "__exception_text_start: %lx\n",
> ms->__exception_text_start);
>         fprintf(fp, "  __exception_text_end: %lx\n",
> ms->__exception_text_end);
>         fprintf(fp, " __irqentry_text_start: %lx\n",
> ms->__irqentry_text_start);
>
> Thanks,
> Kazu
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/crash-utility/attachments/20220325/1706672a/attachment-0001.htm>


More information about the Crash-utility mailing list