lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aee383e3-0e62-716e-4b07-f7557d63cc74@ghiti.fr>
Date:   Tue, 25 Jul 2023 09:46:22 +0200
From:   Alexandre Ghiti <alex@...ti.fr>
To:     Song Shuai <suagrfillet@...il.com>, bhe@...hat.com,
        vgoyal@...hat.com, dyoung@...hat.com, corbet@....net,
        paul.walmsley@...ive.com, palmer@...belt.com,
        aou@...s.berkeley.edu, xianting.tian@...ux.alibaba.com,
        anup@...infault.org, robh@...nel.org, ajones@...tanamicro.com,
        alexghiti@...osinc.com, conor.dooley@...rochip.com
Cc:     kexec@...ts.infradead.org, linux-doc@...r.kernel.org,
        linux-kernel@...r.kernel.org, linux-riscv@...ts.infradead.org
Subject: Re: [RESEND PATCH -fixes 1/2] riscv: Export va_kernel_pa_offset in
 vmcoreinfo

Hi Song,


On 24/07/2023 12:09, Song Shuai wrote:
> Since RISC-V Linux v6.4, the commit 3335068f8721 ("riscv: Use
> PUD/P4D/PGD pages for the linear mapping") changes phys_ram_base
> from the physical start of the kernel to the actual start of the DRAM.
>
> The Crash-utility's VTOP() still uses phys_ram_base and kernel_map.virt_addr
> to translate kernel virtual address, that failed the Crash with Linux v6.4 [1].
>
> Export kernel_map.va_kernel_pa_offset in vmcoreinfo to help Crash translate
> the kernel virtual address correctly.
>
> Fixes: 3335068f8721 ("riscv: Use PUD/P4D/PGD pages for the linear mapping")
> Link: https://lore.kernel.org/linux-riscv/20230724040649.220279-1-suagrfillet@gmail.com/ [1]
> Signed-off-by: Song Shuai <suagrfillet@...il.com>
> ---
>   arch/riscv/kernel/crash_core.c | 2 ++
>   1 file changed, 2 insertions(+)
>
> diff --git a/arch/riscv/kernel/crash_core.c b/arch/riscv/kernel/crash_core.c
> index b351a3c01355..55f1d7856b54 100644
> --- a/arch/riscv/kernel/crash_core.c
> +++ b/arch/riscv/kernel/crash_core.c
> @@ -18,4 +18,6 @@ void arch_crash_save_vmcoreinfo(void)
>   	vmcoreinfo_append_str("NUMBER(MODULES_END)=0x%lx\n", MODULES_END);
>   #endif
>   	vmcoreinfo_append_str("NUMBER(KERNEL_LINK_ADDR)=0x%lx\n", KERNEL_LINK_ADDR);
> +	vmcoreinfo_append_str("NUMBER(va_kernel_pa_offset)=0x%lx\n",
> +						kernel_map.va_kernel_pa_offset);
>   }


You can add:

Reviewed-by: Alexandre Ghiti <alexghiti@...osinc.com>

Thanks for that and for the instructions on how to reproduce the problem 
BTW!

Alex


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ