[lkml]   [2005]   [Oct]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 1/1] 2.6.14-rc3 x86: COMMAND_LINE_SIZE
Andi Kleen wrote:
> Alon Bar-Lev <> writes:
>>+ int "Maximum kernel command-line size"
>>+ default 512
>>+ help
>>+ This option allows you to specify maximum kernel command-line
>>+ for kernel to handle.
> I think making that a config is a really bad idea. What happens
> when the user specifies a very large value. Or a very small one?
> There are subtle dependencies with the boot loader, so this is
> mostly a lie anyways. And it doesn't really safe enough memory to
> bother with a CONFIG.

I don't understand this dependency. The cmd_line_ptr is a
null terminated string which set by the boot loader.
The kernel reads this string until the null or
If the user specified too large buffer or too small buffer
it won't reflect the boot loader since it sets the maximum
sizeof the buffer, and the kernel truncates it.

> Also the last time I tried to increase this all kind of systems
> with old bootloaders exploded (e.g. lilo on systems with large EDID
> information - search the archives). Have these issues been resolved now?
> If yes then I would suggest to just double the default.
> If not it cannot be changed anyways.

I've looked at the sources of lilo and grub, both truncate
the command line to 256 into the old protocol and set the
cmd_line_ptr to point to the same place.

This change will no affect current implementation of the
bootloader, but will allow them to change the code to set
the cmd_line_ptr to the full command line.

I think that the maximum size should be set to 1024, but
since the kernel allocates a static buffer, users may wish
to optimize it. So I think that a configuration option is
the right place.

Best Regards,
Alon Bar-Lev.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-10-11 21:57    [W:0.053 / U:5.996 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site