Skip to contentSkip to conversation

kexec: add kexec flag to support debug printing

PATCH Applied Qiang Ma 2 participants 2 messages Nov 4, 2025 – Nov 11, 2025

Subsystems (2)
lore
Share & tools
lore

Qiang Ma

author
#0 lore raw

PATCH 1/1 kexec: add kexec flag to support debug printing

This add KEXEC_DEBUG to kexec_flags so that it can be passed to kernel when '-d' is added with kexec_load interface. With that flag enabled, kernel can enable the debugging message printing.

This patch requires support from the kexec_load debugging message of the Linux kernel[1].

[1]: https://lore.kernel.org/kexec/[email protected]/

---
 kexec/kexec-syscall.h | 1 +
 kexec/kexec.c         | 1 +
 2 files changed, 2 insertions(+)
kexec/kexec-syscall.h +1 -0
index e9bb7de..b60804f 100644
@@ -120,6 +120,7 @@ static inline long kexec_file_load(int kernel_fd, int initrd_fd,
 #define KEXEC_PRESERVE_CONTEXT	0x00000002
 #define KEXEC_UPDATE_ELFCOREHDR	0x00000004
 #define KEXEC_CRASH_HOTPLUG_SUPPORT	0x00000008
+#define KEXEC_DEBUG		0x00000010
 #define KEXEC_ARCH_MASK		0xffff0000
 
 /* Flags for kexec file based system call */
kexec/kexec.c +1 -0
index c9e4bcb..f425422 100644
@@ -1518,6 +1518,7 @@ int main(int argc, char *argv[])
 			return 0;
 		case OPT_DEBUG:
 			kexec_debug = 1;
+			kexec_flags |= KEXEC_DEBUG;
 			kexec_file_flags |= KEXEC_FILE_DEBUG;
 			break;
 		case OPT_NOIFDOWN:
Signature · 1 line
2.20.1
Applied
#1 lore raw
Quoted 10 lines · Qiang Ma

This add KEXEC_DEBUG to kexec_flags so that it can be passed to kernel when '-d' is added with kexec_load interface. With that flag enabled, kernel can enable the debugging message printing.

This patch requires support from the kexec_load debugging message of the Linux kernel[1].

[1]: https://lore.kernel.org/kexec/[email protected]/

Thanks, applied.

- kexec: add kexec flag to support debug printing
https://git.kernel.org/pub/scm/utils/kernel/kexec/kexec-tools.git/commit/?id=71d6fd99af7e