All of lore.kernel.org
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: Matt Domsch <Matt_Domsch@dell.com>
Cc: Andi Kleen <ak@suse.de>,
	"Catalin(ux aka Dino) BOIE" <util@deuroconsult.ro>,
	Adrian Bunk <bunk@stusta.de>,
	Janos Farkas <jf-ml-k1-1087813225@lk8rp.mail.xeon.eu.org>,
	linux-kernel@vger.kernel.org, Chris Bruner <cryst@golden.net>,
	Andrew Morton <akpm@osdl.org>, Linus Torvalds <torvalds@osdl.org>
Subject: Re: COMMAND_LINE_SIZE increasing in 2.6.11-rc1-bk6
Date: Fri, 21 Jan 2005 11:05:59 -0800	[thread overview]
Message-ID: <41F15297.1000309@zytor.com> (raw)
In-Reply-To: <20050121174645.GA11386@lists.us.dell.com>

Matt Domsch wrote:
> On Fri, Jan 21, 2005 at 08:11:44AM +0100, Andi Kleen wrote:
> 
>>>I really suggest to push this limit to 4k. My reason is that under UML I 
>>>need to put a lot of stuff in command line and uml crash if I not extend 
>>>this limit. Can we make it depend on arhitecture?
>>
>>It's dependent on the architecture already. I would like to enable
>>it on i386/x86-64 because the kernel command line is often used
>>to pass parameters to installers, and having a small limit there
>>can be awkward.
>>
>>But first need to figure out what went wrong with EDD. 
>>
>>Matt D., do you have thoughts on this?
> 
> 
> It is definitely boot-loader dependent.  Simply changing
> COMMAND_LINE_SIZE from 256 to 2048 in the kernel isn't enough.
> 
> There are 2 ways the command line is passed from the boot loader into
> the kernel.
> 
> Boot loader version <= 0x0201  (which LILO uses)
> I believe the command line is located at the end of what was known as
> the 'empty zero page', now known as the boot parameters.  This part is
> black magic to me.
> 
> Boot loader version >= 0x0202  (which GRUB uses)
> command line can be essentially any size, located anywhere in memory,
> and the boot loader tells the kernel where to find it.  The EDD real
> mode code uses only this case for parsing the command line, and if an
> older loader is used, EDD skips parsing the command line looking
> for its options.
> 
> 
> There's little space left in the boot parameters block, my EDD code
> uses nearly all that was remaining, and could use some more if it were
> available.  Having a longer command line would be nice too.  I spoke
> with hpa at OLS last summer about this, and he offered to help.
> Peter?
> 

The protocol itself doesn't encode it, but before we extend it for 
protocol >= 0x0202 we need to make sure that older kernels don't break 
if they get a very long command line (truncation is OK, crashing is 
not.)  If they do crash, we need to add a field in the header.

I don't see any reason why the boot parameter block can't be more than 
one page long.  I think today that it's just a static structure.

	-hpa

  reply	other threads:[~2005-01-21 19:09 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-19 23:13 COMMAND_LINE_SIZE increasing in 2.6.11-rc1-bk6 Janos Farkas
2005-01-20  4:21 ` Chris Bruner
2005-01-20 16:28 ` Adrian Bunk
2005-01-20 16:40   ` Linus Torvalds
2005-01-20 16:48   ` Andi Kleen
2005-01-20 20:53     ` Something very strange on x86_64 2.6.X kernels Eric Dumazet
2005-01-20 21:08       ` Andrew Morton
2005-01-20 21:19         ` Eric Dumazet
2005-01-21 16:26       ` Petr Vandrovec
2005-01-21 16:49         ` Eric Dumazet
2005-01-21 18:30           ` Petr Vandrovec
2005-01-22  1:54         ` Andi Kleen
2005-01-22  2:14           ` Linus Torvalds
2005-01-21  6:58     ` COMMAND_LINE_SIZE increasing in 2.6.11-rc1-bk6 Catalin(ux aka Dino) BOIE
2005-01-21  7:11       ` Andi Kleen
2005-01-21 17:46         ` Matt Domsch
2005-01-21 19:05           ` H. Peter Anvin [this message]
2005-02-07  6:57         ` Werner Almesberger
2005-02-12 13:54           ` Eric W. Biederman
2005-02-12 14:51             ` Werner Almesberger
2005-02-12 15:17               ` Eric W. Biederman
2005-02-14  5:49                 ` Werner Almesberger
2005-02-14  7:36                   ` Eric W. Biederman
2005-02-14  6:15       ` Adam Sulmicki

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=41F15297.1000309@zytor.com \
    --to=hpa@zytor.com \
    --cc=Matt_Domsch@dell.com \
    --cc=ak@suse.de \
    --cc=akpm@osdl.org \
    --cc=bunk@stusta.de \
    --cc=cryst@golden.net \
    --cc=jf-ml-k1-1087813225@lk8rp.mail.xeon.eu.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.org \
    --cc=util@deuroconsult.ro \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.