summaryrefslogtreecommitdiff
path: root/kexec/arch/i386/kexec-bzImage.c
diff options
context:
space:
mode:
Diffstat (limited to 'kexec/arch/i386/kexec-bzImage.c')
-rw-r--r--kexec/arch/i386/kexec-bzImage.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/kexec/arch/i386/kexec-bzImage.c b/kexec/arch/i386/kexec-bzImage.c
index 8fde799..93e37a4 100644
--- a/kexec/arch/i386/kexec-bzImage.c
+++ b/kexec/arch/i386/kexec-bzImage.c
@@ -134,6 +134,17 @@ int do_bzImage_load(struct kexec_info *info,
return -1;
}
+ if (setup_header.protocol_version >= 0x0206) {
+ if (command_line_len > setup_header.cmdline_size) {
+ dbgprintf("Kernel command line too long for kernel!\n");
+ return -1;
+ }
+ } else {
+ if (command_line_len > 255) {
+ dbgprintf("WARNING: This kernel may only support 255 byte command lines\n");
+ }
+ }
+
if (setup_header.protocol_version >= 0x0205) {
relocatable_kernel = setup_header.relocatable_kernel;
dbgprintf("bzImage is relocatable\n");