* [PATCH] THE LINUX/I386 BOOT PROTOCOL - Breaking the 256 limit - Resubmit
@ 2006-02-03 20:32 Alon Bar-Lev
2006-02-06 4:18 ` Randy.Dunlap
2006-02-06 8:43 ` Barry K. Nathan
0 siblings, 2 replies; 4+ messages in thread
From: Alon Bar-Lev @ 2006-02-03 20:32 UTC (permalink / raw)
To: linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1145 bytes --]
Extending the kernel parameters to a size of 1024 on boot
protocol >=2.02 for i386 and x86_64 architectures.
Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
---
Hello,
This patch was submitted a long ago, but did not find its
way into the kernel, but was not rejected as well.
Current implementation allows the kernel to receive up to
255 characters from the bootloader.
In current environment, the command-line is used in order to
specify many values, including suspend/resume, module
arguments, splash, initramfs and more.
255 characters are not enough anymore.
Please consider to merge.
If any of you think that this should be applied for other
architectures, please reply.
Current architectures that have 256 limit are:
alpha, cris, i386, m64k, mips, sh, sh64, sparc, sparc64,
x86_64, xtensa
Current architectures that have 512 values are:
frv(512), h8300(512), ia64(512), m32r(512), m68knommu(512),
mips(512), powerpc(512), v850(512)
Current architectures that are OK:
arm(1024), arm26(1024), parisc(1024)
Current strange ones:
s390(896) - I guess IBM has a good reason for this constant...
Best Regards,
Alon Bar-Lev
[-- Attachment #2: linux-2.6.16-rc2-command-line.diff --]
[-- Type: text/plain, Size: 2542 bytes --]
diff -urNp linux-2.6.16-rc2/Documentation/i386/boot.txt linux-2.6.16-rc2.new/Documentation/i386/boot.txt
--- linux-2.6.16-rc2/Documentation/i386/boot.txt 2006-01-03 05:21:10.000000000 +0200
+++ linux-2.6.16-rc2.new/Documentation/i386/boot.txt 2006-02-03 21:32:03.000000000 +0200
@@ -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
diff -urNp linux-2.6.16-rc2/include/asm-i386/param.h linux-2.6.16-rc2.new/include/asm-i386/param.h
--- linux-2.6.16-rc2/include/asm-i386/param.h 2006-01-03 05:21:10.000000000 +0200
+++ linux-2.6.16-rc2.new/include/asm-i386/param.h 2006-02-03 21:23:21.000000000 +0200
@@ -19,6 +19,6 @@
#endif
#define MAXHOSTNAMELEN 64 /* max length of hostname */
-#define COMMAND_LINE_SIZE 256
+#define COMMAND_LINE_SIZE 1024
#endif
diff -urNp linux-2.6.16-rc2/include/asm-i386/setup.h linux-2.6.16-rc2.new/include/asm-i386/setup.h
--- linux-2.6.16-rc2/include/asm-i386/setup.h 2006-01-03 05:21:10.000000000 +0200
+++ linux-2.6.16-rc2.new/include/asm-i386/setup.h 2006-02-03 21:19:44.000000000 +0200
@@ -17,7 +17,7 @@
#define MAX_NONPAE_PFN (1 << 20)
#define PARAM_SIZE 4096
-#define COMMAND_LINE_SIZE 256
+#define COMMAND_LINE_SIZE 1024
#define OLD_CL_MAGIC_ADDR 0x90020
#define OLD_CL_MAGIC 0xA33F
diff -urNp linux-2.6.16-rc2/include/asm-x86_64/setup.h linux-2.6.16-rc2.new/include/asm-x86_64/setup.h
--- linux-2.6.16-rc2/include/asm-x86_64/setup.h 2006-01-03 05:21:10.000000000 +0200
+++ linux-2.6.16-rc2.new/include/asm-x86_64/setup.h 2006-02-03 21:20:40.000000000 +0200
@@ -1,6 +1,6 @@
#ifndef _x8664_SETUP_H
#define _x8664_SETUP_H
-#define COMMAND_LINE_SIZE 256
+#define COMMAND_LINE_SIZE 1024
#endif
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] THE LINUX/I386 BOOT PROTOCOL - Breaking the 256 limit - Resubmit
2006-02-03 20:32 [PATCH] THE LINUX/I386 BOOT PROTOCOL - Breaking the 256 limit - Resubmit Alon Bar-Lev
@ 2006-02-06 4:18 ` Randy.Dunlap
2006-02-06 7:38 ` Alon Bar-Lev
2006-02-06 8:43 ` Barry K. Nathan
1 sibling, 1 reply; 4+ messages in thread
From: Randy.Dunlap @ 2006-02-06 4:18 UTC (permalink / raw)
To: Alon Bar-Lev; +Cc: linux-kernel
On Fri, 03 Feb 2006 22:32:29 +0200 Alon Bar-Lev wrote:
>
> Extending the kernel parameters to a size of 1024 on boot
> protocol >=2.02 for i386 and x86_64 architectures.
>
> Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
>
> ---
>
> Hello,
>
> This patch was submitted a long ago, but did not find its
> way into the kernel, but was not rejected as well.
>
> Current implementation allows the kernel to receive up to
> 255 characters from the bootloader.
>
> In current environment, the command-line is used in order to
> specify many values, including suspend/resume, module
> arguments, splash, initramfs and more.
>
> 255 characters are not enough anymore.
>
> Please consider to merge.
Please explain this comment and why it is being added:
+ The kernel command line *must* be 256 bytes including the
+ final null.
+
thanks,
---
~Randy
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] THE LINUX/I386 BOOT PROTOCOL - Breaking the 256 limit - Resubmit
2006-02-06 4:18 ` Randy.Dunlap
@ 2006-02-06 7:38 ` Alon Bar-Lev
0 siblings, 0 replies; 4+ messages in thread
From: Alon Bar-Lev @ 2006-02-06 7:38 UTC (permalink / raw)
To: Randy.Dunlap; +Cc: linux-kernel
Hello,
Since I removed this from the main text:
>-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.
I thought it would be appropriate to add it to the older (<2.02) boot
protocols specific notes.
>+ The kernel command line *must* be 256 bytes including the
>+ final null.
I've removed the 256 limit from the 2.02 boot protocol since grub and
lilo guys did not understand the comment: "a boot loader may allow a
longer command line to be passed to permit future kernels to extend
this limit.", they both truncate the command-line to 256 (hard coded).
I thought that it best to make clear that the limit on the
command-line length is determined by the kernel and not by the boot
loader.
I can remove the addition.
Best Regards,
Alon Bar-Lev
On 2/6/06, Randy.Dunlap <rdunlap@xenotime.net> wrote:
> On Fri, 03 Feb 2006 22:32:29 +0200 Alon Bar-Lev wrote:
>
> >
> > Extending the kernel parameters to a size of 1024 on boot
> > protocol >=2.02 for i386 and x86_64 architectures.
> >
> > Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
> >
> > ---
> >
> > Hello,
> >
> > This patch was submitted a long ago, but did not find its
> > way into the kernel, but was not rejected as well.
> >
> > Current implementation allows the kernel to receive up to
> > 255 characters from the bootloader.
> >
> > In current environment, the command-line is used in order to
> > specify many values, including suspend/resume, module
> > arguments, splash, initramfs and more.
> >
> > 255 characters are not enough anymore.
> >
> > Please consider to merge.
>
> Please explain this comment and why it is being added:
>
> + The kernel command line *must* be 256 bytes including the
> + final null.
> +
>
> thanks,
> ---
> ~Randy
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] THE LINUX/I386 BOOT PROTOCOL - Breaking the 256 limit - Resubmit
2006-02-03 20:32 [PATCH] THE LINUX/I386 BOOT PROTOCOL - Breaking the 256 limit - Resubmit Alon Bar-Lev
2006-02-06 4:18 ` Randy.Dunlap
@ 2006-02-06 8:43 ` Barry K. Nathan
1 sibling, 0 replies; 4+ messages in thread
From: Barry K. Nathan @ 2006-02-06 8:43 UTC (permalink / raw)
To: Alon Bar-Lev; +Cc: linux-kernel
On 2/3/06, Alon Bar-Lev <alon.barlev@gmail.com> wrote:
> diff -urNp linux-2.6.16-rc2/include/asm-i386/param.h linux-2.6.16-rc2.new/include/asm-i386/param.h
> --- linux-2.6.16-rc2/include/asm-i386/param.h 2006-01-03 05:21:10.000000000 +0200
> +++ linux-2.6.16-rc2.new/include/asm-i386/param.h 2006-02-03 21:23:21.000000000 +0200
> @@ -19,6 +19,6 @@
> #endif
>
> #define MAXHOSTNAMELEN 64 /* max length of hostname */
> -#define COMMAND_LINE_SIZE 256
> +#define COMMAND_LINE_SIZE 1024
>
> #endif
> diff -urNp linux-2.6.16-rc2/include/asm-i386/setup.h linux-2.6.16-rc2.new/include/asm-i386/setup.h
> --- linux-2.6.16-rc2/include/asm-i386/setup.h 2006-01-03 05:21:10.000000000 +0200
> +++ linux-2.6.16-rc2.new/include/asm-i386/setup.h 2006-02-03 21:19:44.000000000 +0200
> @@ -17,7 +17,7 @@
> #define MAX_NONPAE_PFN (1 << 20)
>
> #define PARAM_SIZE 4096
> -#define COMMAND_LINE_SIZE 256
> +#define COMMAND_LINE_SIZE 1024
>
> #define OLD_CL_MAGIC_ADDR 0x90020
> #define OLD_CL_MAGIC 0xA33F
> diff -urNp linux-2.6.16-rc2/include/asm-x86_64/setup.h linux-2.6.16-rc2.new/include/asm-x86_64/setup.h
> --- linux-2.6.16-rc2/include/asm-x86_64/setup.h 2006-01-03 05:21:10.000000000 +0200
> +++ linux-2.6.16-rc2.new/include/asm-x86_64/setup.h 2006-02-03 21:20:40.000000000 +0200
> @@ -1,6 +1,6 @@
> #ifndef _x8664_SETUP_H
> #define _x8664_SETUP_H
>
> -#define COMMAND_LINE_SIZE 256
> +#define COMMAND_LINE_SIZE 1024
>
> #endif
(Sorry, I didn't notice your patch when you posted it in the past, or
I would have responded back then.)
FWIW, this was tried between 2.6.11-rc1 and 2.6.11-rc2 (except it was
256->2048 instead of 256->1024), and it was reverted before 2.6.11-rc2
because it broke booting with lilo -- for many people, the change
caused their system to freeze early during boot.
This is what the 2.6.11-rc2 changelog has to say about the matter:
> Revert "x86_64/i386: increase command line size" patch
>
> It's a bootup dependancy, you can't just increase it randomly, and
> it breaks booting with LILO.
>
> Pointed out by Janos Farkas and Adrian Bunk.
Has this issue been addressed yet? (i.e. does 1024 avoid the problem
that 2048 had, or did anything else change in the kernel between
2.6.11-rc1 and today to prevent the problem from happening again?)
--
-Barry K. Nathan <barryn@pobox.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-02-06 8:43 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-03 20:32 [PATCH] THE LINUX/I386 BOOT PROTOCOL - Breaking the 256 limit - Resubmit Alon Bar-Lev
2006-02-06 4:18 ` Randy.Dunlap
2006-02-06 7:38 ` Alon Bar-Lev
2006-02-06 8:43 ` Barry K. Nathan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox