[syslinux] [PATCH] com32/lib/syslinux/load_linux.c: cmdline truncated

H. Peter Anvin hpa at zytor.com
Fri May 21 09:02:05 PDT 2010


On 05/21/2010 03:04 AM, Bodo Stroesser wrote:
>>
>> No, this is actively wrong.
>>
>> There is nothing with versions 2.03, .04 or .05 which makes it safe to
>> use 2048 bytes.  I have no idea what SLES11 did, but it sounds like a
>> local change.
>>
>> 	-hpa
> 
> So my patch is bad, sorry.
> 
> On the other hand, shouldn't core/runkernel.inc behave the same in
> truncating command line? If I understand the code correctly, it doesn't.
> 
> When booting the same kernel (02.04) and a 400 chars command line twice,
> once via pxelinux.0 directly, second time via pxelinux.0 and linux.c32,
> the first time it doesn't truncate the command line while the second time
> it does at 255 + 1 chars.
> 
> Bodo
> 

The kernel actually checks the command line length independently, and so
feeding it a too-long line causes truncation.  However, people on this
list complained that silent truncation was undesirable (of course, I'm
not sure that linux.c32 actually prints anything in that case, either.)

Some distros extended the line size unilaterally, I understand -- there
just isn't a way for the boot loader to know.

So there is basically the option to "shoot in the dark and hope for the
best", or be conservative...

	-hpa

-- 
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel.  I don't speak on their behalf.




More information about the Syslinux mailing list