From: Alon Bar-Lev <alon.barlev@gmail.com>
To: Andi Kleen <ak@suse.de>
Cc: linux-kernel@vger.kernel.org, Georg Lippold <georg.lippold@gmx.de>
Subject: Re: [PATCH 1/1] 2.6.14-rc3 x86: COMMAND_LINE_SIZE
Date: Tue, 11 Oct 2005 21:24:57 +0200 [thread overview]
Message-ID: <434C1189.4090207@gmail.com> (raw)
In-Reply-To: <p73br1vsvup.fsf@verdi.suse.de>
Andi Kleen wrote:
> Alon Bar-Lev <alon.barlev@gmail.com> writes:
>
>>+config COMMAND_LINE_MAX_SIZE
>>+ 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
COMMAND_LINE_MAX_SIZE.
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.
next prev parent reply other threads:[~2005-10-11 19:54 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <4315B668.6030603@gmail.com>
2005-08-31 21:29 ` THE LINUX/I386 BOOT PROTOCOL - Breaking the 256 limit H. Peter Anvin
2005-08-31 21:57 ` Chris Wedgwood
2005-08-31 22:01 ` H. Peter Anvin
2005-08-31 22:07 ` Chris Wedgwood
2005-08-31 22:12 ` Jesper Juhl
2005-08-31 22:14 ` Chris Wedgwood
2005-08-31 22:17 ` H. Peter Anvin
2005-08-31 22:18 ` Jesper Juhl
2005-08-31 22:24 ` H. Peter Anvin
2005-09-01 8:54 ` Alon Bar-Lev
2005-08-31 22:12 ` H. Peter Anvin
2005-08-31 22:15 ` Chris Wedgwood
2005-09-01 20:48 ` [syslinux] " Peter Jones
2005-09-06 20:19 ` Alon Bar-Lev
2005-09-06 20:40 ` H. Peter Anvin
2005-09-06 20:49 ` Alon Bar-Lev
2005-10-06 22:49 ` Georg Lippold
2005-10-10 12:44 ` [PATCH] " Georg Lippold
2005-10-10 13:21 ` Jesper Juhl
2005-10-10 13:32 ` Alon Bar-Lev
2005-10-10 13:57 ` Georg Lippold
2005-10-10 14:07 ` Alon Bar-Lev
2005-10-10 14:53 ` H. Peter Anvin
2005-10-10 14:59 ` Alon Bar-Lev
2005-10-10 15:03 ` H. Peter Anvin
2005-10-10 16:23 ` Alon Bar-Lev
2005-10-10 17:02 ` Bernd Petrovitsch
2005-10-10 15:46 ` Georg Lippold
2005-10-10 15:49 ` H. Peter Anvin
2005-10-10 17:16 ` [PATCH 1/1] 2.6.14-rc3 x86: COMMAND_LINE_SIZE Georg Lippold
2005-10-10 18:24 ` Alon Bar-Lev
2005-10-10 20:36 ` Georg Lippold
2005-10-11 8:32 ` Alon Bar-Lev
2005-10-11 16:50 ` Georg Lippold
2005-10-11 17:44 ` Alon Bar-Lev
2005-10-11 19:21 ` Andi Kleen
2005-10-11 19:24 ` Alon Bar-Lev [this message]
2005-10-11 20:21 ` Andi Kleen
2005-10-11 20:04 ` Alon Bar-Lev
2005-10-13 20:18 ` Georg Lippold
2005-10-11 1:48 ` THE LINUX/I386 BOOT PROTOCOL - Breaking the 256 limit Coywolf Qi Hunt
2005-10-11 1:49 ` H. Peter Anvin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=434C1189.4090207@gmail.com \
--to=alon.barlev@gmail.com \
--cc=ak@suse.de \
--cc=georg.lippold@gmx.de \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox