summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Yan <yanaijie@huawei.com>2019-09-20 11:45:45 +0200
committerMichael Ellerman <mpe@ellerman.id.au>2019-11-13 09:27:54 +0100
commit74277f00b23263066772fd9e9106acb6a280f84f (patch)
treea96027c7eef3cd7505ddff5fa26f3f3ddd5c208f
parentpowerpc/fsl_booke/kaslr: dump out kernel offset information on panic (diff)
downloadlinux-74277f00b23263066772fd9e9106acb6a280f84f.tar.xz
linux-74277f00b23263066772fd9e9106acb6a280f84f.zip
powerpc/fsl_booke/kaslr: export offset in VMCOREINFO ELF notes
Like all other architectures such as x86 or arm64, include KASLR offset in VMCOREINFO ELF notes to assist in debugging. After this, we can use crash --kaslr option to parse vmcore generated from a kaslr kernel. Note: The crash tool needs to support --kaslr too. Signed-off-by: Jason Yan <yanaijie@huawei.com> Signed-off-by: Scott Wood <oss@buserror.net> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
-rw-r--r--arch/powerpc/kernel/machine_kexec.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/machine_kexec.c b/arch/powerpc/kernel/machine_kexec.c
index c4ed328a7b96..078fe3d76feb 100644
--- a/arch/powerpc/kernel/machine_kexec.c
+++ b/arch/powerpc/kernel/machine_kexec.c
@@ -86,6 +86,7 @@ void arch_crash_save_vmcoreinfo(void)
VMCOREINFO_STRUCT_SIZE(mmu_psize_def);
VMCOREINFO_OFFSET(mmu_psize_def, shift);
#endif
+ vmcoreinfo_append_str("KERNELOFFSET=%lx\n", kaslr_offset());
}
/*