On Tue, Jul 5, 2022 at 10:10 AM HAGIO KAZUHITO(萩尾 一仁) <k-hagio-ab@nec.com> wrote:

On 2022/07/04 17:40, Qianli Zhao wrote:
> From: Qianli Zhao <qianli.zhao@horizon.ai>
>
> Setting st->_stext_vmlinux to UNINITIALIZED to search for "_stext"
> from the vmlinux. In the scenario where kaslr is disabled and
> without vmcore file, will get the wrong MODULES/VMALLOC ranges,

Thanks for the update, probably s/vmcore file/vmcoreinfo/ is better,
but we will fix it.

Acked-by: Kazuhito Hagio <k-hagio-ab@nec.com>

Lianbo, I think we can merge this first for the ramdump issue, but

Sounds good, Kazu. For the v2: ACK.

is it better to look into the issue you found before merging this?

 
Let's leave it there for now, and dig into the details later.

Thanks.
Lianbo

Thanks,
Kazu

> cause parsing raw dumpfile failure
>
> Signed-off-by: Qianli Zhao <qianli.zhao@horizon.ai>
> ---
> v2: Update patch log and add some comment in code.
>
> ---
>   arm64.c | 9 +++++++++
>   1 file changed, 9 insertions(+)
>
> diff --git a/arm64.c b/arm64.c
> index 0f615cf..5d306cd 100644
> --- a/arm64.c
> +++ b/arm64.c
> @@ -149,6 +149,15 @@ arm64_init(int when)
>   
>               ms = machdep->machspec;
>   
> +             /*
> +              * The st->_stext_vmlinux is needed in arm64_init(PRE_GDB) when a
> +              * dumpfile does not have vmcoreinfo and we use -m vabits_actual
> +              * option, e.g. a raw RAM dumpfile.
> +              *
> +              */
> +             if (ms->VA_BITS_ACTUAL)
> +                     st->_stext_vmlinux = UNINITIALIZED;
> +
>               if (!ms->kimage_voffset && STREQ(pc->live_memsrc, "/dev/crash"))
>                       ioctl(pc->mfd, DEV_CRASH_ARCH_DATA, &ms->kimage_voffset);
>