Re: kernel panic on boot on AMD64

From: Alexander Nyberg
Date: Fri Apr 29 2005 - 15:42:04 EST

> Ok. If you really had such a overlong command line it is ok.
> We should probably check this condition better too and error out.

How about something like this then (I was thinking making it a panic but
not sure). I think it's a good idea to give some kind of indication so
that there is at least some message when the user discovers that some
things specified on cmdline don't start/work.

Check if the user specified a too long kernel command line and warn
about it being truncated.

Signed-off-by: Alexander Nyberg <alexn@xxxxxxxxx>

Index: linux-2.6/init/main.c
--- linux-2.6.orig/init/main.c 2005-04-26 11:41:57.000000000 +0200
+++ linux-2.6/init/main.c 2005-04-29 20:28:44.000000000 +0200
@@ -456,6 +456,8 @@
printk(KERN_NOTICE "Kernel command line: %s\n", saved_command_line);
+ if (strlen(saved_command_line) == COMMAND_LINE_SIZE-1)
+ printk(KERN_ALERT "WARNING: Too long command line! Truncated.\n");
parse_args("Booting kernel", command_line, __start___param,
__stop___param - __start___param,

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at