All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH][TAKE 4] THE LINUX/I386 BOOT PROTOCOL - Breaking the 256 limit
@ 2006-05-05 13:37 Alon Bar-Lev
  2006-05-05 14:09 ` H. Peter Anvin
  0 siblings, 1 reply; 51+ messages in thread
From: Alon Bar-Lev @ 2006-05-05 13:37 UTC (permalink / raw)
  To: Linux Kernel Mailing List
  Cc: Barry K. Nathan, Adrian Bunk, H. Peter Anvin, Riley, tony.luck, johninsd

[-- Attachment #1: Type: text/plain, Size: 2332 bytes --]


Extending the kernel parameters to a user determined size
on boot protocol >=2.02 for i386 and x86_64 architectures.

Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>

---

Hello,

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.

This is take 4 of this submission.

Take 4 (current), no reply of what is the problem in LILO.
Can someone please reply Peter questions? I understand that
people don't want the new kernel config option... But fixing
LILO should be more complex.

Take 3 - Back to menuconfig option, so it won't
break LILO (Although if it is broken because of this, it
should be fixed...).

Here are the comments from H. Peter Anvin:
> Does anyone know the actual details of the LILO breakage?
> If the problem is that LILO doesn't null-terminate the string when it's too long,
> then we can deal with this automatically, without introducing compile-time options
> (which were already once rejected.)
> 
> If the problem is with LILO booting *old* kernels, then that's going to have to require
> some LILO changes, and probably a boot revision bump.

Take 2 - Removed the menuconfig into a fixed 2048 size. This
patch was rejected. 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.

Take 1 - Patch that allows command-line size to be
determined in menuconfig. People did not want to see a new
config option.

---

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-x86-command-line.diff --]
[-- Type: text/plain, Size: 2847 bytes --]

diff -urNp linux-2.6.16/arch/i386/Kconfig linux-2.6.16.new/arch/i386/Kconfig
--- linux-2.6.16/arch/i386/Kconfig	2006-03-20 07:53:29.000000000 +0200
+++ linux-2.6.16.new/arch/i386/Kconfig	2006-04-14 01:35:06.000000000 +0300
@@ -644,6 +644,14 @@ config EFI
 	anything about EFI).  However, even with this option, the resultant
 	kernel should continue to boot on existing non-EFI platforms.
 
+config COMMAND_LINE_SIZE
+	int "Maximum kernel command-line size"
+	range 256 4096
+	default 256
+	---help---
+	This enables adjusting maximum command-line size. If you are unsure
+	specify 256.
+
 config IRQBALANCE
  	bool "Enable kernel irq balancing"
 	depends on SMP && X86_IO_APIC
diff -urNp linux-2.6.16/arch/x86_64/Kconfig linux-2.6.16.new/arch/x86_64/Kconfig
--- linux-2.6.16/arch/x86_64/Kconfig	2006-03-20 07:53:29.000000000 +0200
+++ linux-2.6.16.new/arch/x86_64/Kconfig	2006-04-14 01:35:30.000000000 +0300
@@ -445,6 +445,14 @@ config PHYSICAL_START
 
 	  Don't change this unless you know what you are doing.
 
+config COMMAND_LINE_SIZE
+	int "Maximum kernel command-line size"
+	range 256 4096
+	default 256
+	---help---
+	This enables adjusting maximum command-line size. If you are unsure
+	specify 256.
+
 config SECCOMP
 	bool "Enable seccomp to safely compute untrusted bytecode"
 	depends on PROC_FS
diff -urNp linux-2.6.16/include/asm-i386/param.h linux-2.6.16.new/include/asm-i386/param.h
--- linux-2.6.16/include/asm-i386/param.h	2006-03-20 07:53:29.000000000 +0200
+++ linux-2.6.16.new/include/asm-i386/param.h	2006-04-14 02:00:45.000000000 +0300
@@ -19,6 +19,15 @@
 #endif
 
 #define MAXHOSTNAMELEN	64	/* max length of hostname */
+
+/*
+ * This COMMAND_LINE_SIZE definition was left here
+ * for compatability, its correct location is in setup.h.
+ * Boot loaders that use this parameters will continue
+ * to use 256 maximum command-line size.
+ */
+#ifndef CONFIG_COMMAND_LINE_SIZE
 #define COMMAND_LINE_SIZE 256
+#endif
 
 #endif
diff -urNp linux-2.6.16/include/asm-i386/setup.h linux-2.6.16.new/include/asm-i386/setup.h
--- linux-2.6.16/include/asm-i386/setup.h	2006-03-20 07:53:29.000000000 +0200
+++ linux-2.6.16.new/include/asm-i386/setup.h	2006-04-14 01:32:16.000000000 +0300
@@ -17,7 +17,7 @@
 #define MAX_NONPAE_PFN	(1 << 20)
 
 #define PARAM_SIZE 4096
-#define COMMAND_LINE_SIZE 256
+#define COMMAND_LINE_SIZE CONFIG_COMMAND_LINE_SIZE
 
 #define OLD_CL_MAGIC_ADDR	0x90020
 #define OLD_CL_MAGIC		0xA33F
diff -urNp linux-2.6.16/include/asm-x86_64/setup.h linux-2.6.16.new/include/asm-x86_64/setup.h
--- linux-2.6.16/include/asm-x86_64/setup.h	2006-03-20 07:53:29.000000000 +0200
+++ linux-2.6.16.new/include/asm-x86_64/setup.h	2006-04-14 01:33:27.000000000 +0300
@@ -1,6 +1,6 @@
 #ifndef _x8664_SETUP_H
 #define _x8664_SETUP_H
 
-#define COMMAND_LINE_SIZE	256
+#define COMMAND_LINE_SIZE	CONFIG_COMMAND_LINE_SIZE
 
 #endif

^ permalink raw reply	[flat|nested] 51+ messages in thread
[parent not found: <6OyEf-3Zm-5@gated-at.bofh.it>]

end of thread, other threads:[~2006-08-31 17:41 UTC | newest]

Thread overview: 51+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-05 13:37 [PATCH][TAKE 4] THE LINUX/I386 BOOT PROTOCOL - Breaking the 256 limit Alon Bar-Lev
2006-05-05 14:09 ` H. Peter Anvin
2006-05-05 14:28   ` Alon Bar-Lev
2006-05-05 14:35     ` H. Peter Anvin
2006-05-05 18:10       ` John Coffman
2006-05-05 18:17         ` H. Peter Anvin
2006-05-05 21:48           ` John Coffman
2006-05-05 21:57             ` H. Peter Anvin
2006-05-06  3:57               ` John Coffman
2006-05-06  5:11                 ` H. Peter Anvin
2006-05-06 10:31                   ` Alon Bar-Lev
     [not found]                   ` <44AD583B.5040007@gmail.com>
     [not found]                     ` <44AD5BB4.9090005@zytor.com>
     [not found]                       ` <44AD5D47.8010307@gmail.com>
     [not found]                         ` <44AD5FD8.6010307@zytor.com>
     [not found]                           ` <9e0cf0bf0608031436x19262ab0rb2271b52ce75639d@mail.gmail.com>
     [not found]                             ` <44D278D6.2070106@zytor.com>
     [not found]                               ` <9e0cf0bf0608031542q2da20037h828f4b8f0d01c4d5@mail.gmail.com>
     [not found]                                 ` <44D27F22.4080205@zytor.com>
2006-08-25 23:57                                   ` [PATCH] THE LINUX/I386 BOOT PROTOCOL - Breaking the 256 limit (ping) Alon Bar-Lev
2006-08-27 18:28                                     ` Andi Kleen
2006-08-27 18:50                                       ` H. Peter Anvin
2006-08-27 19:16                                         ` Andi Kleen
2006-08-27 19:32                                           ` H. Peter Anvin
2006-08-27 20:54                                             ` Andi Kleen
2006-08-27 21:39                                               ` H. Peter Anvin
2006-08-28  3:28                                                 ` John Coffman
2006-08-28  6:02                                                 ` Alon Bar-Lev
2006-08-28  6:41                                                   ` Alon Bar-Lev
2006-08-28  7:31                                                     ` H. Peter Anvin
2006-08-28 12:19                                                       ` Alon Bar-Lev
2006-08-28 18:28                                                         ` H. Peter Anvin
2006-08-28 18:46                                                           ` Matt Domsch
2006-08-28 19:00                                                             ` H. Peter Anvin
2006-08-28 20:12                                                               ` Matt Domsch
2006-08-28 20:29                                                                 ` Alon Bar-Lev
2006-08-28 20:33                                                                 ` H. Peter Anvin
2006-08-28 20:43                                                                 ` H. Peter Anvin
2006-08-30 16:49                                                                   ` Alon Bar-Lev
2006-08-30 16:56                                                                     ` Andi Kleen
2006-08-30 17:06                                                                       ` Alon Bar-Lev
2006-08-30 17:31                                                                         ` Andi Kleen
2006-08-30 17:51                                                                           ` Alon Bar-Lev
2006-08-30 18:59                                                                             ` H. Peter Anvin
2006-08-30 19:06                                                                               ` Andi Kleen
2006-08-30 19:07                                                                                 ` H. Peter Anvin
2006-08-30 19:23                                                                               ` Alon Bar-Lev
2006-08-30 19:33                                                                                 ` H. Peter Anvin
2006-08-30 18:58                                                                         ` H. Peter Anvin
2006-08-28 19:24                                                             ` Alon Bar-Lev
2006-08-28 20:32                                                               ` H. Peter Anvin
2006-08-29  0:13                                                             ` [PATCH] Fix the EDD code misparsing the command line H. Peter Anvin
2006-08-29  1:24                                                               ` Petr Vandrovec
2006-08-29  1:36                                                                 ` H. Peter Anvin
2006-08-29  1:51                                                                 ` [PATCH] Fix the EDD code misparsing the command line (rev 2) H. Peter Anvin
2006-08-27 19:59                                           ` [PATCH] THE LINUX/I386 BOOT PROTOCOL - Breaking the 256 limit (ping) Alon Bar-Lev
2006-05-05 22:02             ` [PATCH][TAKE 4] THE LINUX/I386 BOOT PROTOCOL - Breaking the 256 limit Alon Bar-Lev
     [not found] <6OyEf-3Zm-5@gated-at.bofh.it>
     [not found] ` <6PCwg-3mz-43@gated-at.bofh.it>
     [not found]   ` <6PDBU-5Qb-25@gated-at.bofh.it>
     [not found]     ` <6PDBU-5Qb-23@gated-at.bofh.it>
2006-08-31 17:32       ` [PATCH] THE LINUX/I386 BOOT PROTOCOL - Breaking the 256 limit (ping) Bodo Eggert
2006-08-31 17:40         ` H. Peter Anvin

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.