[RESEND PATCH v8 8/8] crash_core: skip MEMBLOCK_NODUMP regions when building vmcore ELF header
From: Wandun Chen
Date: Fri Oct 16 2026 - 02:19:32 EST
From: Wandun Chen <chenwandun@xxxxxxxxxxx>
Reserve regions (for GPU, DSP, ...) carry no data useful for crash
analysis. Exclude MEMBLOCK_NODUMP regions from the vmcore ELF header to
reduce vmcore size and capture time. crash_should_skip_region() now also
returns true for MEMBLOCK_NODUMP.
Signed-off-by: Wandun Chen <chenwandun@xxxxxxxxxxx>
Tested-by: Meijing Zhao <zhaomeijing@xxxxxxxxxxx>
Acked-by: Baoquan He <baoquan.he@xxxxxxxxx>
---
kernel/crash_core.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/crash_core.c b/kernel/crash_core.c
index e161c8b65e00..0e2ddc933b22 100644
--- a/kernel/crash_core.c
+++ b/kernel/crash_core.c
@@ -283,10 +283,10 @@ static struct crash_mem *alloc_cmem(unsigned int nr_ranges)
}
#ifdef CONFIG_ARCH_KEEP_MEMBLOCK
-/* Exclude NOMAP regions from the vmcore. */
+/* Exclude NOMAP and NODUMP regions from the vmcore. */
static bool crash_should_skip_region(struct memblock_region *reg)
{
- return memblock_is_nomap(reg);
+ return memblock_is_nomap(reg) || memblock_is_nodump(reg);
}
unsigned int __weak arch_get_system_nr_ranges(void)
--
2.43.0