Skip to contentSkip to conversation

kexec_file: add kexec_file flag to support debug printing

PATCH Applied Baoquan He 2 participants 6 messages Nov 14, 2023 – Mar 15, 2024

Subsystems (2)
lore
Share & tools
lore

Baoquan He

author
#0 lore raw

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

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

---
 kexec/kexec-syscall.h | 1 +
 kexec/kexec.c         | 1 +
 2 files changed, 2 insertions(+)
kexec/kexec-syscall.h +1 -0
index 2559bffb93da..73e52543e1b0 100644
@@ -119,6 +119,7 @@ static inline long kexec_file_load(int kernel_fd, int initrd_fd,
 #define KEXEC_FILE_UNLOAD	0x00000001
 #define KEXEC_FILE_ON_CRASH	0x00000002
 #define KEXEC_FILE_NO_INITRAMFS	0x00000004
+#define KEXEC_FILE_DEBUG	0x00000008
 
 /* These values match the ELF architecture values. 
  * Unless there is a good reason that should continue to be the case.
kexec/kexec.c +1 -0
index 08edfca2349a..b5393e3b20aa 100644
@@ -1477,6 +1477,7 @@ int main(int argc, char *argv[])
 			return 0;
 		case OPT_DEBUG:
 			kexec_debug = 1;
+			kexec_file_flags |= KEXEC_FILE_DEBUG;
 			break;
 		case OPT_NOIFDOWN:
 			skip_ifdown = 1;
Signature · 7 lines
2.41.0


_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
#1 lore raw
Quoted 5 lines · Baoquan He

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

Thanks,

this looks fine to me.
But perhaps the corresponding Kernel patch should land first? Let me know what you think.

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

author
#2 lore raw
Quoted 5 lines · Simon Horman
Quoted 4 lines · Baoquan He

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

Quoted 7 lines
Quoted 1 line

Thanks,

this looks fine to me.
But perhaps the corresponding Kernel patch should land first? Let me know what you think.

Yes, agree. I will ping you once kernel patches are taken. Thanks.

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

author
#3 lore raw
In reply to Simon Horman
Quoted 5 lines · Simon Horman
Quoted 4 lines · Baoquan He

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

Quoted 7 lines
Quoted 1 line

Thanks,

this looks fine to me.
But perhaps the corresponding Kernel patch should land first? Let me know what you think.

Ping, the relevant kernel patches landed in mainline kernel, please help merge this patch.

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

Applied
#4 lore raw
Quoted 8 lines · Baoquan He
Quoted 7 lines · Simon Horman
Quoted 5 lines · Baoquan He

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

Quoted 8 lines
Quoted 5 lines

Thanks,

this looks fine to me.
But perhaps the corresponding Kernel patch should land first? Let me know what you think.

Ping, the relevant kernel patches landed in mainline kernel, please help merge this patch.

Thanks, applied.

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

author
#5 lore raw
Quoted 11 lines · Simon Horman
Quoted 10 lines · Baoquan He
Quoted 9 lines · Simon Horman
Quoted 5 lines · Baoquan He

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

Thanks,

Quoted 8 lines
Quoted 6 lines
Quoted 3 lines

this looks fine to me.
But perhaps the corresponding Kernel patch should land first? Let me know what you think.

Ping, the relevant kernel patches landed in mainline kernel, please help merge this patch.

Thanks, applied.

Great, thanks a lot.

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec