[PATCH v2 6/6] crashdump/x86: set the elfcorehdr segment size for hotplug

Eric DeVolder eric.devolder at oracle.com
Wed May 3 15:16:11 PDT 2023


For hotplug, the elfcorehdr segment must be oversized to allow a
growing number of CPUs or memory regions.

Signed-off-by: Eric DeVolder <eric.devolder at oracle.com>
---
 kexec/arch/i386/crashdump-x86.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/kexec/arch/i386/crashdump-x86.c b/kexec/arch/i386/crashdump-x86.c
index cb86ca7..18f745e 100644
--- a/kexec/arch/i386/crashdump-x86.c
+++ b/kexec/arch/i386/crashdump-x86.c
@@ -957,6 +957,11 @@ int load_crashdump_segments(struct kexec_info *info, char* mod_cmdline,
 		memsz = bufsz;
 	}
 
+	/* Handle override in order to support hotplug */
+	if (do_hotplug) {
+		memsz = _ALIGN(elfcorehdrsz, align);
+	}
+
 	/* Record the location of the elfcorehdr for hotplug handling */
 	info->elfcorehdr =
 	elfcorehdr = add_buffer(info, tmp, bufsz, memsz, align, min_base,
-- 
2.31.1




More information about the kexec mailing list