hy,
I'm trying to install linux on an HP DL385 but directly on boot I got
this kernel panic:
http://www.puettmann.net/temp/panic.jpg
Config attached.
Ruben
--
Ruben Puettmann
[email protected]
http://www.puettmann.net
On Wed, 27 Apr 2005 16:03:42 +0200
Ruben Puettmann <[email protected]> wrote:
> hy,
> I'm trying to install linux on an HP DL385 but directly on boot I got
> this kernel panic:
>
> http://www.puettmann.net/temp/panic.jpg
>
> Config attached.
Looks like this code in init/main.c:
if (late_time_init)
late_time_init();
sees a garbage value in late_time_init (garbage being
%eax == 0x00307974.743d656c, which is "le=tty0\n",
as in "console=tty0").
How long is your kernel boot/command line?
Please post it.
---
~Randy
On Wed, 27 Apr 2005 16:03:42 +0200 Ruben Puettmann wrote:
| hy,
|
|
| I'm trying to install linux on an HP DL385 but directly on boot I got
| this kernel panic:
|
| http://www.puettmann.net/temp/panic.jpg
|
| Config attached.
I booted that .config (with a couple of SCSI & SATA device changes)
with no problem on a dual-proc Opteron machine (not HP DL385).
What compiler are you using? (gcc --version)
---
~Randy
On Wed, Apr 27, 2005 at 03:27:04PM -0700, Randy.Dunlap wrote:
Looks like this code in init/main.c:
>
> if (late_time_init)
> late_time_init();
>
> sees a garbage value in late_time_init (garbage being
> %eax == 0x00307974.743d656c, which is "le=tty0\n",
> as in "console=tty0").
>
> How long is your kernel boot/command line?
> Please post it.
It was boot over pxe here is the append line from the
pxelinux.cfg/default
APPEND vga=normal rw load_ramdisk=0 root=/dev/nfs nfsroot=192.168.112.1:/store/rescue/sarge-amd64,rsize=8192,wsize=8192,timo=12,retrans=3,mountvers=3,nfsvers=3
Ruben
--
Ruben Puettmann
[email protected]
http://www.puettmann.net
On Thu, 28 Apr 2005 11:05:40 +0200
Ruben Puettmann <[email protected]> wrote:
> On Wed, Apr 27, 2005 at 03:27:04PM -0700, Randy.Dunlap wrote:
> Looks like this code in init/main.c:
> >
> > if (late_time_init)
> > late_time_init();
> >
> > sees a garbage value in late_time_init (garbage being
> > %eax == 0x00307974.743d656c, which is "le=tty0\n",
> > as in "console=tty0").
> >
> > How long is your kernel boot/command line?
> > Please post it.
>
> It was boot over pxe here is the append line from the
> pxelinux.cfg/default
>
> APPEND vga=normal rw load_ramdisk=0 root=/dev/nfs nfsroot=192.168.112.1:/store/rescue/sarge-amd64,rsize=8192,wsize=8192,timo=12,retrans=3,mountvers=3,nfsvers=3
Hm, no "console=tty...." at all. That didn't help (me) much.
Does this happen consistently?
What does "gcc --version" say?
---
~Randy
On Thu, Apr 28, 2005 at 08:43:13AM -0700, Randy.Dunlap wrote:
> Hm, no "console=tty...." at all. That didn't help (me) much.
>
> Does this happen consistently?
Yes ist does. With the DL385 with newest Bios and with a bunch ob Tyan
Opteron Boards.
> What does "gcc --version" say?
>
root@pergolesi:~# gcc --version
gcc (GCC) 3.3.5 (Debian 1:3.3.5-12)
Its pergolesi.debian.org one of the Debian Development Server.
Ruben
--
Ruben Puettmann
[email protected]
http://www.puettmann.net
On 4/28/05, Randy.Dunlap <[email protected]> wrote:
> On Thu, 28 Apr 2005 11:05:40 +0200
> Ruben Puettmann <[email protected]> wrote:
>
> > On Wed, Apr 27, 2005 at 03:27:04PM -0700, Randy.Dunlap wrote:
> > Looks like this code in init/main.c:
> > >
> > > if (late_time_init)
> > > late_time_init();
> > >
> > > sees a garbage value in late_time_init (garbage being
> > > %eax == 0x00307974.743d656c, which is "le=tty0\n",
> > > as in "console=tty0").
> > >
> > > How long is your kernel boot/command line?
> > > Please post it.
> >
> > It was boot over pxe here is the append line from the
> > pxelinux.cfg/default
> >
> > APPEND vga=normal rw load_ramdisk=0 root=/dev/nfs nfsroot=192.168.112.1:/store/rescue/sarge-amd64,rsize=8192,wsize=8192,timo=12,retrans=3,mountvers=3,nfsvers=3
>
> Hm, no "console=tty...." at all. That didn't help (me) much.
Could that boot loader pxe append console=tty implicitly?
>From the vmlinux Ruben gave me,
ffffffff807980d8 A __bss_start
ffffffff807980d8 A _edata
ffffffff80798100 B boot_cpu_stack
ffffffff8079c100 B boot_exception_stacks
ffffffff807a1100 B system_state
ffffffff807a1120 B saved_command_line
ffffffff807a1220 B late_time_init
ffffffff807a1228 b execute_command
ffffffff807a1230 b panic_later
ffffffff807a1238 b panic_param
...
It seems possible to luckily skip the garbage. Comment out the two
lines and see if it works.
/* if (late_time_init)
late_time_init(); */
--
Coywolf Qi Hunt
http://sosdg.org/~coywolf/
On Fri, 29 Apr 2005 00:38:24 +0800
Coywolf Qi Hunt <[email protected]> wrote:
> On 4/28/05, Randy.Dunlap <[email protected]> wrote:
> > On Thu, 28 Apr 2005 11:05:40 +0200
> > Ruben Puettmann <[email protected]> wrote:
> >
> > > On Wed, Apr 27, 2005 at 03:27:04PM -0700, Randy.Dunlap wrote:
> > > Looks like this code in init/main.c:
> > > >
> > > > if (late_time_init)
> > > > late_time_init();
> > > >
> > > > sees a garbage value in late_time_init (garbage being
> > > > %eax == 0x00307974.743d656c, which is "le=tty0\n",
> > > > as in "console=tty0").
> > > >
> > > > How long is your kernel boot/command line?
> > > > Please post it.
> > >
> > > It was boot over pxe here is the append line from the
> > > pxelinux.cfg/default
> > >
> > > APPEND vga=normal rw load_ramdisk=0 root=/dev/nfs nfsroot=192.168.112.1:/store/rescue/sarge-amd64,rsize=8192,wsize=8192,timo=12,retrans=3,mountvers=3,nfsvers=3
> >
> > Hm, no "console=tty...." at all. That didn't help (me) much.
>
> Could that boot loader pxe append console=tty implicitly?
It could... I don't know anything about pxe boot.
> >From the vmlinux Ruben gave me,
> ffffffff807980d8 A __bss_start
> ffffffff807980d8 A _edata
> ffffffff80798100 B boot_cpu_stack
> ffffffff8079c100 B boot_exception_stacks
> ffffffff807a1100 B system_state
> ffffffff807a1120 B saved_command_line
> ffffffff807a1220 B late_time_init
> ffffffff807a1228 b execute_command
> ffffffff807a1230 b panic_later
> ffffffff807a1238 b panic_param
> ...
>
> It seems possible to luckily skip the garbage. Comment out the two
> lines and see if it works.
>
> /* if (late_time_init)
> late_time_init(); */
Yes, that would help verify that the command line is the problem.
I also recall Andi having a few problems with large command lines
on x86-64... so it still smells like that to me. (ak added to cc:)
---
~Randy
On Fri, Apr 29, 2005 at 12:38:24AM +0800, Coywolf Qi Hunt wrote:
> > Hm, no "console=tty...." at all. That didn't help (me) much.
> Could that boot loader pxe append console=tty implicitly?
I found nothing about that pxe does this.
> It seems possible to luckily skip the garbage. Comment out the two
> lines and see if it works.
>
> /* if (late_time_init)
> late_time_init(); */
In which file ?
Ruben
--
Ruben Puettmann
[email protected]
http://www.puettmann.net
>
> I'm trying to install linux on an HP DL385 but directly on boot I got
> this kernel panic:
>
> http://www.puettmann.net/temp/panic.jpg
This is bogus appending stuff to the saved_command_line and at the same
time in Rubens case it touches the late_time_init() which breakes havoc.
Signed-off-by: Alexander Nyberg <[email protected]>
Index: linux-2.6/arch/x86_64/kernel/head64.c
===================================================================
--- linux-2.6.orig/arch/x86_64/kernel/head64.c 2005-04-26 11:41:43.000000000 +0200
+++ linux-2.6/arch/x86_64/kernel/head64.c 2005-04-29 11:57:46.000000000 +0200
@@ -93,9 +93,6 @@
#ifdef CONFIG_SMP
cpu_set(0, cpu_online_map);
#endif
- /* default console: */
- if (!strstr(saved_command_line, "console="))
- strcat(saved_command_line, " console=tty0");
s = strstr(saved_command_line, "earlyprintk=");
if (s != NULL)
setup_early_printk(s);
Alexander Nyberg <[email protected]> wrote:
>
> >
> > I'm trying to install linux on an HP DL385 but directly on boot I got
> > this kernel panic:
> >
> > http://www.puettmann.net/temp/panic.jpg
>
>
> This is bogus appending stuff to the saved_command_line and at the same
> time in Rubens case it touches the late_time_init() which breakes havoc.
-ETOOTERSE. Do you meen that the user's command line was so long that this
strcat wandered off the end of the buffer and corrupted late_time_init?
> Signed-off-by: Alexander Nyberg <[email protected]>
>
> Index: linux-2.6/arch/x86_64/kernel/head64.c
> ===================================================================
> --- linux-2.6.orig/arch/x86_64/kernel/head64.c 2005-04-26 11:41:43.000000000 +0200
> +++ linux-2.6/arch/x86_64/kernel/head64.c 2005-04-29 11:57:46.000000000 +0200
> @@ -93,9 +93,6 @@
> #ifdef CONFIG_SMP
> cpu_set(0, cpu_online_map);
> #endif
> - /* default console: */
> - if (!strstr(saved_command_line, "console="))
> - strcat(saved_command_line, " console=tty0");
Wasn't that code there for a reason?
On Fri, Apr 29, 2005 at 03:10:27AM -0700, Andrew Morton wrote:
> > This is bogus appending stuff to the saved_command_line and at the same
> > time in Rubens case it touches the late_time_init() which breakes havoc.
>
> -ETOOTERSE. Do you meen that the user's command line was so long that this
> strcat wandered off the end of the buffer and corrupted late_time_init?
>
>
> > Signed-off-by: Alexander Nyberg <[email protected]>
> >
> > Index: linux-2.6/arch/x86_64/kernel/head64.c
> > ===================================================================
> > --- linux-2.6.orig/arch/x86_64/kernel/head64.c 2005-04-26 11:41:43.000000000 +0200
> > +++ linux-2.6/arch/x86_64/kernel/head64.c 2005-04-29 11:57:46.000000000 +0200
> > @@ -93,9 +93,6 @@
> > #ifdef CONFIG_SMP
> > cpu_set(0, cpu_online_map);
> > #endif
> > - /* default console: */
> > - if (!strstr(saved_command_line, "console="))
> > - strcat(saved_command_line, " console=tty0");
>
> Wasn't that code there for a reason?
>
The patch didn't apply on 2.6.11.7 it gives this reject file:
***************
*** 93,101 ****
#ifdef CONFIG_SMP
cpu_set(0, cpu_online_map);
#endif
- /* default console: */
- if (!strstr(saved_command_line, "console="))
- strcat(saved_command_line, " console=tty0");
s = strstr(saved_command_line, "earlyprintk=");
if (s != NULL)
setup_early_printk(s);
--- 93,98 ----
#ifdef CONFIG_SMP
cpu_set(0, cpu_online_map);
#endif
s = strstr(saved_command_line, "earlyprintk=");
if (s != NULL)
setup_early_printk(s);
After apply by hand it works yes this was ist. Can this be fixed in the
next Versions?
Ruben
--
Ruben Puettmann
[email protected]
http://www.puettmann.net
fre 2005-04-29 klockan 03:10 -0700 skrev Andrew Morton:
> Alexander Nyberg <[email protected]> wrote:
> >
> > >
> > > I'm trying to install linux on an HP DL385 but directly on boot I got
> > > this kernel panic:
> > >
> > > http://www.puettmann.net/temp/panic.jpg
> >
> >
> > This is bogus appending stuff to the saved_command_line and at the same
> > time in Rubens case it touches the late_time_init() which breakes havoc.
>
> -ETOOTERSE. Do you meen that the user's command line was so long that this
> strcat wandered off the end of the buffer and corrupted late_time_init?
Yes indeed, 256 chars has now really been proven to not be long enough.
>
> > Signed-off-by: Alexander Nyberg <[email protected]>
> >
> > Index: linux-2.6/arch/x86_64/kernel/head64.c
> > ===================================================================
> > --- linux-2.6.orig/arch/x86_64/kernel/head64.c 2005-04-26 11:41:43.000000000 +0200
> > +++ linux-2.6/arch/x86_64/kernel/head64.c 2005-04-29 11:57:46.000000000 +0200
> > @@ -93,9 +93,6 @@
> > #ifdef CONFIG_SMP
> > cpu_set(0, cpu_online_map);
> > #endif
> > - /* default console: */
> > - if (!strstr(saved_command_line, "console="))
> > - strcat(saved_command_line, " console=tty0");
>
> Wasn't that code there for a reason?
Appending console=tty0 is from what I can see redundant. And if it
really has a reason it needs a comment and a check to see if there
really is room in saved_command_line for it. We'll see what Andi has to
say...
btw x64 is seemingly the only architecture that actually uses
saved_command_line as the real working command line and not
command_line, this is a bit confusing.
On Thu, Apr 28, 2005 at 09:47:21AM -0700, Randy.Dunlap wrote:
> On Fri, 29 Apr 2005 00:38:24 +0800
> Coywolf Qi Hunt <[email protected]> wrote:
>
> > On 4/28/05, Randy.Dunlap <[email protected]> wrote:
> > > On Thu, 28 Apr 2005 11:05:40 +0200
> > > Ruben Puettmann <[email protected]> wrote:
> > >
> > > > On Wed, Apr 27, 2005 at 03:27:04PM -0700, Randy.Dunlap wrote:
> > > > Looks like this code in init/main.c:
> > > > >
> > > > > if (late_time_init)
> > > > > late_time_init();
> > > > >
> > > > > sees a garbage value in late_time_init (garbage being
> > > > > %eax == 0x00307974.743d656c, which is "le=tty0\n",
> > > > > as in "console=tty0").
> > > > >
> > > > > How long is your kernel boot/command line?
> > > > > Please post it.
> > > >
> > > > It was boot over pxe here is the append line from the
> > > > pxelinux.cfg/default
> > > >
> > > > APPEND vga=normal rw load_ramdisk=0 root=/dev/nfs nfsroot=192.168.112.1:/store/rescue/sarge-amd64,rsize=8192,wsize=8192,timo=12,retrans=3,mountvers=3,nfsvers=3
> > >
> > > Hm, no "console=tty...." at all. That didn't help (me) much.
> >
> > Could that boot loader pxe append console=tty implicitly?
>
> It could... I don't know anything about pxe boot.
>
>
> > >From the vmlinux Ruben gave me,
> > ffffffff807980d8 A __bss_start
> > ffffffff807980d8 A _edata
> > ffffffff80798100 B boot_cpu_stack
> > ffffffff8079c100 B boot_exception_stacks
> > ffffffff807a1100 B system_state
> > ffffffff807a1120 B saved_command_line
> > ffffffff807a1220 B late_time_init
> > ffffffff807a1228 b execute_command
> > ffffffff807a1230 b panic_later
> > ffffffff807a1238 b panic_param
> > ...
> >
> > It seems possible to luckily skip the garbage. Comment out the two
> > lines and see if it works.
> >
> > /* if (late_time_init)
> > late_time_init(); */
>
> Yes, that would help verify that the command line is the problem.
> I also recall Andi having a few problems with large command lines
> on x86-64... so it still smells like that to me. (ak added to cc:)
late_time_init is not in my tree. Someone else must have submitted it.
iirc it was a workaround for some race in the NMI watchdog setup, but
that has since then be properly fixed.
I would recommend to just drop the patch.
-Andi
On Fri, Apr 29, 2005 at 12:06:02PM +0200, Alexander Nyberg wrote:
> >
> > I'm trying to install linux on an HP DL385 but directly on boot I got
> > this kernel panic:
> >
> > http://www.puettmann.net/temp/panic.jpg
>
>
Hmm? saved_command_Line should have enough space to add a simple string.
It is a 1024bytes. Unless you already have a 1k command line it should
be quite ok.
Why do you think it is bogus?
> This is bogus appending stuff to the saved_command_line and at the same
> time in Rubens case it touches the late_time_init() which breakes havoc.
I dont agree with this patch.
-Andi
>
> Signed-off-by: Alexander Nyberg <[email protected]>
>
> Index: linux-2.6/arch/x86_64/kernel/head64.c
> ===================================================================
> --- linux-2.6.orig/arch/x86_64/kernel/head64.c 2005-04-26 11:41:43.000000000 +0200
> +++ linux-2.6/arch/x86_64/kernel/head64.c 2005-04-29 11:57:46.000000000 +0200
> @@ -93,9 +93,6 @@
> #ifdef CONFIG_SMP
> cpu_set(0, cpu_online_map);
> #endif
> - /* default console: */
> - if (!strstr(saved_command_line, "console="))
> - strcat(saved_command_line, " console=tty0");
> s = strstr(saved_command_line, "earlyprintk=");
> if (s != NULL)
> setup_early_printk(s);
>
>
On Fri, Apr 29, 2005 at 01:45:59PM +0200, Alexander Nyberg wrote:
> fre 2005-04-29 klockan 03:10 -0700 skrev Andrew Morton:
> > Alexander Nyberg <[email protected]> wrote:
> > >
> > > >
> > > > I'm trying to install linux on an HP DL385 but directly on boot I got
> > > > this kernel panic:
> > > >
> > > > http://www.puettmann.net/temp/panic.jpg
> > >
> > >
> > > This is bogus appending stuff to the saved_command_line and at the same
> > > time in Rubens case it touches the late_time_init() which breakes havoc.
> >
> > -ETOOTERSE. Do you meen that the user's command line was so long that this
> > strcat wandered off the end of the buffer and corrupted late_time_init?
>
> Yes indeed, 256 chars has now really been proven to not be long enough.
So the user had really 256 characters command line? That is hard to
believe because afaik most boot loaders cannot even pass that much.
>
> >
> > > Signed-off-by: Alexander Nyberg <[email protected]>
> > >
> > > Index: linux-2.6/arch/x86_64/kernel/head64.c
> > > ===================================================================
> > > --- linux-2.6.orig/arch/x86_64/kernel/head64.c 2005-04-26 11:41:43.000000000 +0200
> > > +++ linux-2.6/arch/x86_64/kernel/head64.c 2005-04-29 11:57:46.000000000 +0200
> > > @@ -93,9 +93,6 @@
> > > #ifdef CONFIG_SMP
> > > cpu_set(0, cpu_online_map);
> > > #endif
> > > - /* default console: */
> > > - if (!strstr(saved_command_line, "console="))
> > > - strcat(saved_command_line, " console=tty0");
> >
> > Wasn't that code there for a reason?
>
> Appending console=tty0 is from what I can see redundant. And if it
> really has a reason it needs a comment and a check to see if there
> really is room in saved_command_line for it. We'll see what Andi has to
> say...
It was needed long ago (in 2.5) to work around bugs in the console subsystem.
It is probably not needed anymore. It can be dropped.
>
> btw x64 is seemingly the only architecture that actually uses
> saved_command_line as the real working command line and not
> command_line, this is a bit confusing.
I have no problem with changing it if someone sends a patch.
-Andi
On Fri, Apr 29, 2005 at 04:32:15PM +0200, Andi Kleen wrote:
>
> Hmm? saved_command_Line should have enough space to add a simple string.
> It is a 1024bytes. Unless you already have a 1k command line it should
> be quite ok.
Here it seems that it is 256 bytes :
init/main.c:char saved_command_line[COMMAND_LINE_SIZE];
include/asm-x86_64/setup.h:#define COMMAND_LINE_SIZE 256
> Why do you think it is bogus?
>
> > This is bogus appending stuff to the saved_command_line and at the same
> > time in Rubens case it touches the late_time_init() which breakes havoc.
>
> I dont agree with this patch.
>
The patch workes here fine. After apply the Server boots without any
problem.
Ruben
--
Ruben Puettmann
[email protected]
http://www.puettmann.net
> Hmm? saved_command_Line should have enough space to add a simple string.
> It is a 1024bytes. Unless you already have a 1k command line it should
> be quite ok.
init/main.c:
char saved_command_line[COMMAND_LINE_SIZE];
inclide/asm-x86-64/setup.h:
#define COMMAND_LINE_SIZE 256
Rubens command line is a total of 251 chars, adding "console=tty0" will
exceed it.
> Why do you think it is bogus?
>
I thought that saved_command_line on x64 was like the other archs, an
untouched copy and it wouldn't have made sense to apply another string
to it then, but I was wrong as it is the working line.
I still don't understand why console=tty0 is to be appended however.
> > This is bogus appending stuff to the saved_command_line and at the same
> > time in Rubens case it touches the late_time_init() which breakes havoc.
>
> I dont agree with this patch.
>
> -Andi
>
> >
> > Signed-off-by: Alexander Nyberg <[email protected]>
> >
> > Index: linux-2.6/arch/x86_64/kernel/head64.c
> > ===================================================================
> > --- linux-2.6.orig/arch/x86_64/kernel/head64.c 2005-04-26 11:41:43.000000000 +0200
> > +++ linux-2.6/arch/x86_64/kernel/head64.c 2005-04-29 11:57:46.000000000 +0200
> > @@ -93,9 +93,6 @@
> > #ifdef CONFIG_SMP
> > cpu_set(0, cpu_online_map);
> > #endif
> > - /* default console: */
> > - if (!strstr(saved_command_line, "console="))
> > - strcat(saved_command_line, " console=tty0");
> > s = strstr(saved_command_line, "earlyprintk=");
> > if (s != NULL)
> > setup_early_printk(s);
> >
> >
--
Alexander Nyberg <[email protected]>
On Fri, Apr 29, 2005 at 04:29:47PM +0200, Andi Kleen wrote:
>
> late_time_init is not in my tree. Someone else must have submitted it.
> iirc it was a workaround for some race in the NMI watchdog setup, but
> that has since then be properly fixed.
>
It is in 2.6.11.7 :
root@dl380g3:[/mnt/kerneltest/linux-2.6.11.7] > grep -r late_time_init *
arch/mips/pmc-sierra/yosemite/setup.c:extern void
(*late_time_init)(void);
arch/mips/pmc-sierra/yosemite/setup.c:static void __init
py_late_time_init(void)
arch/mips/pmc-sierra/yosemite/setup.c: late_time_init =
py_late_time_init;
arch/mips/vr41xx/nec-cmbvr4133/setup.c:extern void
(*late_time_init)(void);
arch/mips/vr41xx/nec-cmbvr4133/setup.c: late_time_init =
vr4133_serial_init;
arch/i386/kernel/time.c:extern void (*late_time_init)(void);
arch/i386/kernel/time.c: late_time_init = hpet_time_init;
arch/ppc/platforms/sbc82xx.c:extern void (*late_time_init)(void);
arch/ppc/platforms/sbc82xx.c: * late_time_init() is call after paging
init.
arch/ppc/platforms/sbc82xx.c: late_time_init =
sbc82xx_time_init;
init/main.c:void (*late_time_init)(void);
init/main.c: if (late_time_init)
init/main.c: late_time_init();
Ruben
--
Ruben Puettmann
[email protected]
http://www.puettmann.net
On Fri, Apr 29, 2005 at 04:41:04PM +0200, Ruben Puettmann wrote:
> On Fri, Apr 29, 2005 at 04:32:15PM +0200, Andi Kleen wrote:
> >
> > Hmm? saved_command_Line should have enough space to add a simple string.
> > It is a 1024bytes. Unless you already have a 1k command line it should
> > be quite ok.
>
> Here it seems that it is 256 bytes :
>
> init/main.c:char saved_command_line[COMMAND_LINE_SIZE];
>
> include/asm-x86_64/setup.h:#define COMMAND_LINE_SIZE 256
Yes, only the early buffer is 1K.
>
>
> > Why do you think it is bogus?
> >
> > > This is bogus appending stuff to the saved_command_line and at the same
> > > time in Rubens case it touches the late_time_init() which breakes havoc.
> >
> > I dont agree with this patch.
> >
>
> The patch workes here fine. After apply the Server boots without any
> problem.
Ok. If you really had such a overlong command line it is ok.
We should probably check this condition better too and error out.
-Andi
>
>
> Ruben
>
> --
> Ruben Puettmann
> [email protected]
> http://www.puettmann.net
On Fri, Apr 29, 2005 at 04:44:27PM +0200, Alexander Nyberg wrote:
> > Hmm? saved_command_Line should have enough space to add a simple string.
> > It is a 1024bytes. Unless you already have a 1k command line it should
> > be quite ok.
>
> init/main.c:
> char saved_command_line[COMMAND_LINE_SIZE];
>
> inclide/asm-x86-64/setup.h:
> #define COMMAND_LINE_SIZE 256
>
> Rubens command line is a total of 251 chars, adding "console=tty0" will
> exceed it.
Ok that makes sense. I missed the fact that the original report
had such a overlong command line.
>
> > Why do you think it is bogus?
> >
>
> I thought that saved_command_line on x64 was like the other archs, an
> untouched copy and it wouldn't have made sense to apply another string
> to it then, but I was wrong as it is the working line.
>
> I still don't understand why console=tty0 is to be appended however.
It was needed in some 2.5 kernel when the console subsystem was
very broken and I got tired of debugging it and just added this
easy workaround. Probably should have taken it out later, but
then these things tend to stick around.
-Andi
> Ok. If you really had such a overlong command line it is ok.
>
> We should probably check this condition better too and error out.
>
How about something like this then (I was thinking making it a panic but
not sure). I think it's a good idea to give some kind of indication so
that there is at least some message when the user discovers that some
things specified on cmdline don't start/work.
Check if the user specified a too long kernel command line and warn
about it being truncated.
Signed-off-by: Alexander Nyberg <[email protected]>
Index: linux-2.6/init/main.c
===================================================================
--- linux-2.6.orig/init/main.c 2005-04-26 11:41:57.000000000 +0200
+++ linux-2.6/init/main.c 2005-04-29 20:28:44.000000000 +0200
@@ -456,6 +456,8 @@
build_all_zonelists();
page_alloc_init();
printk(KERN_NOTICE "Kernel command line: %s\n", saved_command_line);
+ if (strlen(saved_command_line) == COMMAND_LINE_SIZE-1)
+ printk(KERN_ALERT "WARNING: Too long command line! Truncated.\n");
parse_early_param();
parse_args("Booting kernel", command_line, __start___param,
__stop___param - __start___param,
On Fri, Apr 29, 2005 at 10:11:56PM +0200, Alexander Nyberg wrote:
> > Ok. If you really had such a overlong command line it is ok.
> >
> > We should probably check this condition better too and error out.
> >
>
> How about something like this then (I was thinking making it a panic but
> not sure). I think it's a good idea to give some kind of indication so
> that there is at least some message when the user discovers that some
> things specified on cmdline don't start/work.
Looks good. Thanks.
At some point should also figure out how to make it bigger.
I tried it once, but it broke lilo with EDID.
-Andi
>
>
> Check if the user specified a too long kernel command line and warn
> about it being truncated.
>
> Signed-off-by: Alexander Nyberg <[email protected]>
>
> Index: linux-2.6/init/main.c
> ===================================================================
> --- linux-2.6.orig/init/main.c 2005-04-26 11:41:57.000000000 +0200
> +++ linux-2.6/init/main.c 2005-04-29 20:28:44.000000000 +0200
> @@ -456,6 +456,8 @@
> build_all_zonelists();
> page_alloc_init();
> printk(KERN_NOTICE "Kernel command line: %s\n", saved_command_line);
> + if (strlen(saved_command_line) == COMMAND_LINE_SIZE-1)
> + printk(KERN_ALERT "WARNING: Too long command line! Truncated.\n");
> parse_early_param();
> parse_args("Booting kernel", command_line, __start___param,
> __stop___param - __start___param,
>
>
>
>