Skip to content

Commit 2369f17

Browse files
HuangShijie2024willdeacon
authored andcommitted
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>
1 parent a8a733b commit 2369f17

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
@@ -20,6 +20,12 @@ void arch_crash_save_vmcoreinfo(void)
2020
{
2121
VMCOREINFO_NUMBER(VA_BITS);
2222
/* Please note VMCOREINFO_NUMBER() uses "%d", not "%x" */
23+
vmcoreinfo_append_str("NUMBER(MODULES_VADDR)=0x%lx\n", MODULES_VADDR);
24+
vmcoreinfo_append_str("NUMBER(MODULES_END)=0x%lx\n", MODULES_END);
25+
vmcoreinfo_append_str("NUMBER(VMALLOC_START)=0x%lx\n", VMALLOC_START);
26+
vmcoreinfo_append_str("NUMBER(VMALLOC_END)=0x%lx\n", VMALLOC_END);
27+
vmcoreinfo_append_str("NUMBER(VMEMMAP_START)=0x%lx\n", VMEMMAP_START);
28+
vmcoreinfo_append_str("NUMBER(VMEMMAP_END)=0x%lx\n", VMEMMAP_END);
2329
vmcoreinfo_append_str("NUMBER(kimage_voffset)=0x%llx\n",
2430
kimage_voffset);
2531
vmcoreinfo_append_str("NUMBER(PHYS_OFFSET)=0x%llx\n",

0 commit comments

Comments
 (0)