crash failed with mainline kernel with kaslr enabled, see below log
[snipped some garbage output]:
WARNING: could not find MAGIC_START!
[snip]
xtime timespec.tv_sec: 100000135c: Sun Aug 20 16:54:52 CST 4147
utsname:
sysname: (not printable)
nodename: (not printable)
release: (not printable)
version: (not printable)
machine: (not printable)
domainname: (not printable)
crash: cannot determine base kernel version
linux_banner:
[snip]
crash: /home/ruyang/git/linux/vmlinux and ./root/root/vmcore.elf do not match!
Add the flags which will enable kaslr offset calculating.
Signed-off-by: Dave Young <yangrr.2009(a)tsinghua.org.cn>
---
[v1->v2: tune the code comment and commit log according to Mukesh]
loongarch64.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/loongarch64.c b/loongarch64.c
index c95910f5ea4a..6b518d4af113 100644
--- a/loongarch64.c
+++ b/loongarch64.c
@@ -1893,6 +1893,13 @@ loongarch64_init(int when)
machdep->last_ptbl_read = 0;
machdep->verify_paddr = generic_verify_paddr;
machdep->ptrs_per_pgd = PTRS_PER_PGD;
+
+ /*
+ * derive_kaslr_offset() handles the CONFIG_RANDOMIZE_BASE=n
+ * case by setting kt->relocate to 0.
+ */
+ if (!kt->relocate && !(kt->flags2 & (RELOC_AUTO|KASLR)))
+ kt->flags2 |= (RELOC_AUTO|KASLR);
break;
case PRE_GDB:
--
2.51.1