Re: [PATCH][TAKE 3] THE LINUX/I386 BOOT PROTOCOL - Breaking the 256limit

From: Alon Bar-Lev
Date: Fri Apr 14 2006 - 14:08:43 EST


H. Peter Anvin wrote:
Alon Bar-Lev wrote:
diff -urNp linux-2.6.16/Documentation/i386/boot.txt linux-2.6.16.new/Documentation/i386/boot.txt
--- linux-2.6.16/Documentation/i386/boot.txt 2006-03-20 07:53:29.000000000 +0200
+++ linux-2.6.16.new/Documentation/i386/boot.txt 2006-04-14 01:55:47.000000000 +0300
@@ -235,11 +235,8 @@ loader to communicate with the kernel. relevant to the boot loader itself, see "special command line options"
below.
-The kernel command line is a null-terminated string currently up to
-255 characters long, plus the final null. A string that is too long
-will be automatically truncated by the kernel, a boot loader may allow
-a longer command line to be passed to permit future kernels to extend
-this limit.
+The kernel command line is a null-terminated string. A string that is too
+long will be automatically truncated by the kernel.
If the boot protocol version is 2.02 or later, the address of the
kernel command line is given by the header field cmd_line_ptr (see
@@ -260,6 +257,9 @@ command line is entered using the follow
covered by setup_move_size, so you may need to adjust this
field.
+ The kernel command line *must* be 256 bytes including the
+ final null.
+
**** SAMPLE BOOT CONFIGURATION

This chunk is confusing at the very best.

-hpa


Hello,

The problem is that boot loader developers did not understand the old statement: "A string that is too long will be automatically truncated by the kernel, a boot loader may allow a longer command line to be passed to permit future kernels to extend this limit."

Most of them handed the same buffer to < 2.02 protocols and >= 2.0.2 protocols. When I've opened bugs against that they claimed that they follow instructions since the 256 limit was explicitly mentioned. I've ended up in patching GRUB my-self to allow this.

I thought that this should be made clearer... But maybe I did not write it too well.

I've removed the 255+1 limitation from the boot protocol main description, so there will be no known limit there... And moved it to the <2.02 section notes.

Can you please suggest a different phrasing? Or maybe you think that it is not needed at all... But then I have a problem of making boot loader fix their code.

Best Regards,
Alon Bar-Lev.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/