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

Bodo Stroesser bstroesser at ts.fujitsu.com
Fri May 21 03:04:01 PDT 2010


On 05/19/2010 07:43 PM, H. Peter Anvin wrote:

>On 05/19/2010 08:40 AM, Bodo Stroesser wrote:
>
>> Hi,
>> 
>> in syslinux-386, I think I've found a problem in
>>    com32/lib/syslinux/load_linux.c
>> that leads to cmdline being truncated unnecessarily when e.g.
>> linux.c32 is used.
>> 
>> The patch below fixes the problem for me. But I don't know,
>> whether the patch is safe in all cases. I tried to reproduce
>> the logic found in runkernel.inc, but I might have missed
>> something. So, feel free to tell me what's wrong with it.
>> 
>> Please CC me, as I'm not on the list.
>> 
>
>
>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


More information about the Syslinux mailing list