Re: [PATCH 1/1] 2.6.14-rc3 x86: COMMAND_LINE_SIZE

From: Alon Bar-Lev
Date: Mon Oct 10 2005 - 13:43:12 EST

Georg Lippold wrote:
H. Peter Anvin wrote on Mon, Oct 10, 2005 at 08:49:04AM -0700:

I would suggest updating your patch to include x86-64 and documentation,


Just a few suggestions...

1. The old protocol must stay with 255 + null command line... I suggest:

For boot protocol <2.02, the kernel command line is a null-terminated string up to 255 characters long, plus the final null. For boot protocol >=2.02 command line that is referred by cmd_line_ptr is null-terminated string, the kernel will truncate this string if it is too large to handle.

2. I suggest adding a new configuration to set the size of command-line, so it won't be hard coded...

Add CONFIG_CMD_LINE_SIZE with default of 1024.

I've done this by init/Kconfig...

--- Kconfig 2005-10-10 20:16:14.000000000 +0200
+++ 2005-10-10 20:14:13.000000000 +0200
@@ -77,13 +77,6 @@ config LOCALVERSION
object and source tree, in that order. Your total string can
be a maximum of 64 characters.

+ integer "Set maximum command line size"
+ default 1024
+ help
+ This option allows you to specify the maximum kernel command
+ line arguments.
config SWAP
bool "Support for paging of anonymous memory (swap)"
depends on MMU


I've found that not all files that includes setup.h and param.h include config.h... So I've written:


So that it fails if you try to use COMMAND_LINE_SIZE and did not include config.h, another alternative is to include config.h in these include files... I don't know what the conventions are.

Best Regards,
Alon Bar-Lev.
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