[RFC][PATCH v3 05/16] kernel/vmcore_info: Register dynamic information into Kmemdump
Eugen Hristev
eugen.hristev at linaro.org
Fri Sep 12 08:08:44 PDT 2025
Register vmcoreinfo information into kmemdump.
Because the size of the info is computed after all entries are being
added, there is no point in registering the whole page, rather, call
the kmemdump registration once everything is in place with the right size.
A second reason is that the vmcoreinfo is added as a region inside
the ELF coreimage note, there is no point in having blank space at the end.
Signed-off-by: Eugen Hristev <eugen.hristev at linaro.org>
---
kernel/vmcore_info.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/kernel/vmcore_info.c b/kernel/vmcore_info.c
index e066d31d08f8..3e2e846ba9c8 100644
--- a/kernel/vmcore_info.c
+++ b/kernel/vmcore_info.c
@@ -14,6 +14,7 @@
#include <linux/cpuhotplug.h>
#include <linux/memblock.h>
#include <linux/kmemleak.h>
+#include <linux/kmemdump.h>
#include <asm/page.h>
#include <asm/sections.h>
@@ -118,6 +119,12 @@ phys_addr_t __weak paddr_vmcoreinfo_note(void)
}
EXPORT_SYMBOL(paddr_vmcoreinfo_note);
+static void vmcoreinfo_kmemdump(void)
+{
+ kmemdump_register_id(KMEMDUMP_ID_COREIMAGE_VMCOREINFO,
+ (void *)vmcoreinfo_data, vmcoreinfo_size);
+}
+
static int __init crash_save_vmcoreinfo_init(void)
{
vmcoreinfo_data = (unsigned char *)get_zeroed_page(GFP_KERNEL);
@@ -227,6 +234,7 @@ static int __init crash_save_vmcoreinfo_init(void)
arch_crash_save_vmcoreinfo();
update_vmcoreinfo_note();
+ vmcoreinfo_kmemdump();
return 0;
}
--
2.43.0
More information about the linux-arm-kernel
mailing list