Skip to content

Commit 5cc3cdb

Browse files
author
Baoquan He
committed
arm64: crash_core: Export MODULES, VMALLOC, and VMEMMAP ranges
JIRA: https://issues.redhat.com/browse/RHEL-32199 Upstream Status: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git commit 2369f17 Author: Huang Shijie <shijie@os.amperecomputing.com> Date: Wed Feb 9 09:26:42 2022 +0000 arm64: crash_core: Export MODULES, VMALLOC, and VMEMMAP ranges The following interrelated ranges are needed by the kdump crash tool: MODULES_VADDR ~ MODULES_END, VMALLOC_START ~ VMALLOC_END, VMEMMAP_START ~ VMEMMAP_END Since these values change from time to time, it is preferable to export them via vmcoreinfo than to change the crash's code frequently. Signed-off-by: Huang Shijie <shijie@os.amperecomputing.com> Link: https://lore.kernel.org/r/20220209092642.9181-1-shijie@os.amperecomputing.com Signed-off-by: Will Deacon <will@kernel.org> Signed-off-by: Baoquan He <bhe@redhat.com>
1 parent 2a597ed commit 5cc3cdb

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

Documentation/admin-guide/kdump/vmcoreinfo.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -494,6 +494,14 @@ architecture which is used to lookup the page-tables for the Virtual
494494
addresses in the higher VA range (refer to ARMv8 ARM document for
495495
more details).
496496

497+
MODULES_VADDR|MODULES_END|VMALLOC_START|VMALLOC_END|VMEMMAP_START|VMEMMAP_END
498+
-------------
499+
500+
Used to get the correct ranges:
501+
MODULES_VADDR ~ MODULES_END-1 : Kernel module space.
502+
VMALLOC_START ~ VMALLOC_END-1 : vmalloc() / ioremap() space.
503+
VMEMMAP_START ~ VMEMMAP_END-1 : vmemmap region, used for struct page array.
504+
497505
arm
498506
===
499507

arch/arm64/kernel/crash_core.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@ void arch_crash_save_vmcoreinfo(void)
2121
{
2222
VMCOREINFO_NUMBER(VA_BITS);
2323
/* Please note VMCOREINFO_NUMBER() uses "%d", not "%x" */
24+
vmcoreinfo_append_str("NUMBER(MODULES_VADDR)=0x%lx\n", MODULES_VADDR);
25+
vmcoreinfo_append_str("NUMBER(MODULES_END)=0x%lx\n", MODULES_END);
26+
vmcoreinfo_append_str("NUMBER(VMALLOC_START)=0x%lx\n", VMALLOC_START);
27+
vmcoreinfo_append_str("NUMBER(VMALLOC_END)=0x%lx\n", VMALLOC_END);
28+
vmcoreinfo_append_str("NUMBER(VMEMMAP_START)=0x%lx\n", VMEMMAP_START);
29+
vmcoreinfo_append_str("NUMBER(VMEMMAP_END)=0x%lx\n", VMEMMAP_END);
2430
vmcoreinfo_append_str("NUMBER(kimage_voffset)=0x%llx\n",
2531
kimage_voffset);
2632
vmcoreinfo_append_str("NUMBER(PHYS_OFFSET)=0x%llx\n",

0 commit comments

Comments
 (0)