Re: [PATCH] Add support for longer kernel command lines (i586, x86_64, IA64)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

On Mon, Mar 05, 2007 at 11:34:33PM +0100, Bernhard Walle wrote:
> This patch increases the kernel command line size for x86_64 and i386
> to 2048 characters. This is necessary because with kernel 2.6.21
> and newer, the kernel command line size has increased and kexec needs
> lot of command line space, so this solves some "command line overflow"
> problems.
> To be able to warn users running older kernels that the command line
> is too long (and don't wait that the kernel truncates it), the
> patch tries to get the kernel command line length from the kernel
> image that is loaded if possible by checking the length of the
> static array that holds the kernel command line when booting.

It does not work for compressed images (bzImage). So kexing older bzImages
will never give you a warning message.

Secondly, I think creating dependencies on kernel symbols is bad. Tomorrow
if kernel code changes, we are broken. The problem "crash" faces so often.
So we should create a well defined interface which can remain constant 
even if kernel code changes.

I personally think either there should be a way to specify command line
length supported in the image format (bzImage) or we should export it to 
user space, lets say through /proc/ interface. 

Specifying max cmdline lenght in bzImage header helps because any bootloader
then take a clue and warn user about excessive command line length.

Otherwise we can export something like /proc/max_cmdline_len on the lines
of /proc/cmdline.

fastboot mailing list

[Netdev]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Photo]     [Yosemite]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Linux Media]     [Linux Resources]

Powered by Linux