* [PATCH 2/2] riscv: export kaslr offset and satp in VMCOREINFO ELF notes
@ 2026-02-11 4:49 Austin Kim
2026-02-13 0:45 ` Paul Walmsley
0 siblings, 1 reply; 2+ messages in thread
From: Austin Kim @ 2026-02-11 4:49 UTC (permalink / raw)
To: Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti
Cc: linux-kernel, linux-riscv, austindh.kim, austin.kim
From: Austin Kim <austin.kim@lge.com>
The following options are required by the kdump crash utility for RISC-V
based vmcore file:
- kaslr: If the vmcore is generated from a KASLR-enabled Linux kernel,
the KASLR offset is required for the crash utility to load
the vmcore. Without the proper kaslr option, the crash utility
fails to load the vmcore file.
- satp: The exact root page table address helps determine the correct base
PGD address.
With this patch, RISC-V VMCOREINFO ELF notes now include both kaslr
and satp information.
Signed-off-by: Austin Kim <austin.kim@lge.com>
---
arch/riscv/kernel/vmcore_info.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/arch/riscv/kernel/vmcore_info.c b/arch/riscv/kernel/vmcore_info.c
index d5e448aa9..682ba423c 100644
--- a/arch/riscv/kernel/vmcore_info.c
+++ b/arch/riscv/kernel/vmcore_info.c
@@ -3,6 +3,11 @@
#include <linux/vmcore_info.h>
#include <linux/pagemap.h>
+static inline u64 get_satp_value(void)
+{
+ return csr_read(CSR_SATP);
+}
+
void arch_crash_save_vmcoreinfo(void)
{
VMCOREINFO_NUMBER(phys_ram_base);
@@ -27,5 +32,7 @@ void arch_crash_save_vmcoreinfo(void)
#else
vmcoreinfo_append_str("NUMBER(va_kernel_pa_offset)=0x%lx\n",
kernel_map.va_kernel_pa_offset);
+ vmcoreinfo_append_str("KERNELOFFSET=%lx\n", kaslr_offset());
+ vmcoreinfo_append_str("NUMBER(satp)=0x%llx\n", get_satp_value());
#endif
}
--
2.34.1
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 2/2] riscv: export kaslr offset and satp in VMCOREINFO ELF notes
2026-02-11 4:49 [PATCH 2/2] riscv: export kaslr offset and satp in VMCOREINFO ELF notes Austin Kim
@ 2026-02-13 0:45 ` Paul Walmsley
0 siblings, 0 replies; 2+ messages in thread
From: Paul Walmsley @ 2026-02-13 0:45 UTC (permalink / raw)
To: Austin Kim
Cc: Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti,
linux-kernel, linux-riscv, austin.kim
On Wed, 11 Feb 2026, Austin Kim wrote:
> From: Austin Kim <austin.kim@lge.com>
>
> The following options are required by the kdump crash utility for RISC-V
> based vmcore file:
>
> - kaslr: If the vmcore is generated from a KASLR-enabled Linux kernel,
> the KASLR offset is required for the crash utility to load
> the vmcore. Without the proper kaslr option, the crash utility
> fails to load the vmcore file.
> - satp: The exact root page table address helps determine the correct base
> PGD address.
>
> With this patch, RISC-V VMCOREINFO ELF notes now include both kaslr
> and satp information.
>
> Signed-off-by: Austin Kim <austin.kim@lge.com>
Thanks, queued for v7.0-rc.
- Paul
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-02-13 0:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-11 4:49 [PATCH 2/2] riscv: export kaslr offset and satp in VMCOREINFO ELF notes Austin Kim
2026-02-13 0:45 ` Paul Walmsley
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox