* [PATCH] i386 kernel instant reboot with older binutils fix
@ 2007-01-03 4:16 Vivek Goyal
2007-01-03 6:44 ` Eric W. Biederman
2007-01-03 13:53 ` Adrian Bunk
0 siblings, 2 replies; 8+ messages in thread
From: Vivek Goyal @ 2007-01-03 4:16 UTC (permalink / raw)
To: linux kernel mailing list
Cc: Linus Torvalds, Andi Kleen, Morton Andrew Morton,
Eric W. Biederman, Fastboot mailing list, Adrian Bunk,
Jean Delvare, Segher Boessenkool
o i386 kernel reboots instantly if compiled with binutils older than
2.6.15.
o Older binutils required explicit flags to mark a section allocatable
and executable(AX). Newer binutils automatically mark a section AX if
the name starts with .text.
o While defining a new section using assembler "section" directive,
explicitly mention section flags.
Signed-off-by: Segher Boessenkool <segher@kernel.crashing.org>
Signed-off-by: Vivek Goyal <vgoyal@in.ibm.com>
---
arch/i386/boot/compressed/head.S | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff -puN arch/i386/boot/compressed/head.S~jean-reboot-issue-fix arch/i386/boot/compressed/head.S
--- linux-2.6.20-rc2-reloc/arch/i386/boot/compressed/head.S~jean-reboot-issue-fix 2007-01-02 09:54:56.000000000 +0530
+++ linux-2.6.20-rc2-reloc-root/arch/i386/boot/compressed/head.S 2007-01-02 09:57:46.000000000 +0530
@@ -28,7 +28,7 @@
#include <asm/page.h>
#include <asm/boot.h>
-.section ".text.head"
+.section ".text.head","ax",@progbits
.globl startup_32
startup_32:
_
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] i386 kernel instant reboot with older binutils fix
2007-01-03 4:16 [PATCH] i386 kernel instant reboot with older binutils fix Vivek Goyal
@ 2007-01-03 6:44 ` Eric W. Biederman
2007-01-03 6:55 ` Vivek Goyal
2007-01-03 13:53 ` Adrian Bunk
1 sibling, 1 reply; 8+ messages in thread
From: Eric W. Biederman @ 2007-01-03 6:44 UTC (permalink / raw)
To: vgoyal
Cc: linux kernel mailing list, Linus Torvalds, Andi Kleen,
Morton Andrew Morton, Fastboot mailing list, Adrian Bunk,
Jean Delvare, Segher Boessenkool
Vivek Goyal <vgoyal@in.ibm.com> writes:
> o i386 kernel reboots instantly if compiled with binutils older than
> 2.6.15.
>
> o Older binutils required explicit flags to mark a section allocatable
> and executable(AX). Newer binutils automatically mark a section AX if
> the name starts with .text.
>
> o While defining a new section using assembler "section" directive,
> explicitly mention section flags.
As such this patch looks fine, and is certainly harmless. But don't we
also need to address the issue that .text.head is not listed in the
linker script?
i.e. Don't we also need?
.text : AT(ADDR(.text) - LOAD_OFFSET) {
_text = .; /* Text and read-only data */
+ *(.text.head)
*(.text)
SCHED_TEXT
LOCK_TEXT
KPROBES_TEXT
*(.fixup)
*(.gnu.warning)
_etext = .; /* End of text section */
} :text = 0x9090
I'm not even certain how the i386 kernel links properly without the above.
Eric
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] i386 kernel instant reboot with older binutils fix
2007-01-03 6:44 ` Eric W. Biederman
@ 2007-01-03 6:55 ` Vivek Goyal
2007-01-03 7:50 ` Eric W. Biederman
0 siblings, 1 reply; 8+ messages in thread
From: Vivek Goyal @ 2007-01-03 6:55 UTC (permalink / raw)
To: Eric W. Biederman
Cc: linux kernel mailing list, Linus Torvalds, Andi Kleen,
Morton Andrew Morton, Fastboot mailing list, Adrian Bunk,
Jean Delvare, Segher Boessenkool
On Tue, Jan 02, 2007 at 11:44:34PM -0700, Eric W. Biederman wrote:
> Vivek Goyal <vgoyal@in.ibm.com> writes:
>
> > o i386 kernel reboots instantly if compiled with binutils older than
> > 2.6.15.
> >
> > o Older binutils required explicit flags to mark a section allocatable
> > and executable(AX). Newer binutils automatically mark a section AX if
> > the name starts with .text.
> >
> > o While defining a new section using assembler "section" directive,
> > explicitly mention section flags.
>
> As such this patch looks fine, and is certainly harmless. But don't we
> also need to address the issue that .text.head is not listed in the
> linker script?
>
> i.e. Don't we also need?
>
> .text : AT(ADDR(.text) - LOAD_OFFSET) {
> _text = .; /* Text and read-only data */
> + *(.text.head)
> *(.text)
> SCHED_TEXT
> LOCK_TEXT
> KPROBES_TEXT
> *(.fixup)
> *(.gnu.warning)
> _etext = .; /* End of text section */
> } :text = 0x9090
>
>
> I'm not even certain how the i386 kernel links properly without the above.
Hi Eric,
This .text.head section is not part of vmlinux. This is part of uncompressed
portion in bzImage. arch/i386/boot/compressed/head.S.
Hence, arch/i386/boot/compressed/vmlinux.lds should take care of it which
already has entry for linking .text.head section.
. = 0 ;
.text.head : {
_head = . ;
*(.text.head)
_ehead = . ;
}
Thanks
Vivek
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] i386 kernel instant reboot with older binutils fix
2007-01-03 6:55 ` Vivek Goyal
@ 2007-01-03 7:50 ` Eric W. Biederman
0 siblings, 0 replies; 8+ messages in thread
From: Eric W. Biederman @ 2007-01-03 7:50 UTC (permalink / raw)
To: vgoyal
Cc: linux kernel mailing list, Linus Torvalds, Andi Kleen,
Morton Andrew Morton, Fastboot mailing list, Adrian Bunk,
Jean Delvare, Segher Boessenkool
Vivek Goyal <vgoyal@in.ibm.com> writes:
> Hi Eric,
>
> This .text.head section is not part of vmlinux. This is part of uncompressed
> portion in bzImage. arch/i386/boot/compressed/head.S.
>
> Hence, arch/i386/boot/compressed/vmlinux.lds should take care of it which
> already has entry for linking .text.head section.
Yep. Sorry never mind.
Thanks for the good tracking on this one.
Eric
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] i386 kernel instant reboot with older binutils fix
2007-01-03 4:16 [PATCH] i386 kernel instant reboot with older binutils fix Vivek Goyal
2007-01-03 6:44 ` Eric W. Biederman
@ 2007-01-03 13:53 ` Adrian Bunk
2007-01-03 14:18 ` Vivek Goyal
2007-01-03 14:18 ` Jean Delvare
1 sibling, 2 replies; 8+ messages in thread
From: Adrian Bunk @ 2007-01-03 13:53 UTC (permalink / raw)
To: Vivek Goyal
Cc: linux kernel mailing list, Linus Torvalds, Andi Kleen,
Morton Andrew Morton, Eric W. Biederman, Fastboot mailing list,
Jean Delvare, Segher Boessenkool
On Wed, Jan 03, 2007 at 09:46:45AM +0530, Vivek Goyal wrote:
>
> o i386 kernel reboots instantly if compiled with binutils older than
> 2.6.15.
Should that have been "2.15"?
And is the following perhaps the same issue?
Subject : kernel immediately reboots instead of booting
References : http://lkml.org/lkml/2007/1/2/15
Submitter : Steve Youngs <steve@youngs.au.com>
Status : unknown
@Steve:
You had binutils 2.14.90.0.6 .
Does this patch fix it for you?
> o Older binutils required explicit flags to mark a section allocatable
> and executable(AX). Newer binutils automatically mark a section AX if
> the name starts with .text.
>
> o While defining a new section using assembler "section" directive,
> explicitly mention section flags.
>
> Signed-off-by: Segher Boessenkool <segher@kernel.crashing.org>
> Signed-off-by: Vivek Goyal <vgoyal@in.ibm.com>
> ---
>
> arch/i386/boot/compressed/head.S | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff -puN arch/i386/boot/compressed/head.S~jean-reboot-issue-fix arch/i386/boot/compressed/head.S
> --- linux-2.6.20-rc2-reloc/arch/i386/boot/compressed/head.S~jean-reboot-issue-fix 2007-01-02 09:54:56.000000000 +0530
> +++ linux-2.6.20-rc2-reloc-root/arch/i386/boot/compressed/head.S 2007-01-02 09:57:46.000000000 +0530
> @@ -28,7 +28,7 @@
> #include <asm/page.h>
> #include <asm/boot.h>
>
> -.section ".text.head"
> +.section ".text.head","ax",@progbits
> .globl startup_32
>
> startup_32:
> _
cu
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] i386 kernel instant reboot with older binutils fix
2007-01-03 13:53 ` Adrian Bunk
@ 2007-01-03 14:18 ` Vivek Goyal
2007-01-03 15:02 ` Segher Boessenkool
2007-01-03 14:18 ` Jean Delvare
1 sibling, 1 reply; 8+ messages in thread
From: Vivek Goyal @ 2007-01-03 14:18 UTC (permalink / raw)
To: Adrian Bunk
Cc: linux kernel mailing list, Linus Torvalds, Andi Kleen,
Morton Andrew Morton, Eric W. Biederman, Fastboot mailing list,
Jean Delvare, Segher Boessenkool
On Wed, Jan 03, 2007 at 02:53:26PM +0100, Adrian Bunk wrote:
> On Wed, Jan 03, 2007 at 09:46:45AM +0530, Vivek Goyal wrote:
> >
> > o i386 kernel reboots instantly if compiled with binutils older than
> > 2.6.15.
>
> Should that have been "2.15"?
>
Yes Adrian, it should be 2.15 instead. My mistake.
Hopefully this patch should solve steve's issue too.
Reattaching the patch with corrected changelog.
Thanks
Vivek
o i386 kernel reboots instantly if compiled with binutils older than
2.15.
o Older binutils required explicit flags to mark a section allocatable
and executable(AX). Newer binutils automatically mark a section AX if
the name starts with .text.
o While defining a new section using assembler "section" directive,
explicitly mention section flags.
Signed-off-by: Segher Boessenkool <segher@kernel.crashing.org>
Signed-off-by: Vivek Goyal <vgoyal@in.ibm.com>
---
arch/i386/boot/compressed/head.S | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff -puN arch/i386/boot/compressed/head.S~jean-reboot-issue-fix arch/i386/boot/compressed/head.S
--- linux-2.6.20-rc2-reloc/arch/i386/boot/compressed/head.S~jean-reboot-issue-fix 2007-01-02 09:54:56.000000000 +0530
+++ linux-2.6.20-rc2-reloc-root/arch/i386/boot/compressed/head.S 2007-01-02 09:57:46.000000000 +0530
@@ -28,7 +28,7 @@
#include <asm/page.h>
#include <asm/boot.h>
-.section ".text.head"
+.section ".text.head","ax",@progbits
.globl startup_32
startup_32:
_
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] i386 kernel instant reboot with older binutils fix
2007-01-03 13:53 ` Adrian Bunk
2007-01-03 14:18 ` Vivek Goyal
@ 2007-01-03 14:18 ` Jean Delvare
1 sibling, 0 replies; 8+ messages in thread
From: Jean Delvare @ 2007-01-03 14:18 UTC (permalink / raw)
To: Adrian Bunk
Cc: Vivek Goyal, linux kernel mailing list, Linus Torvalds,
Andi Kleen, Morton Andrew Morton, Eric W. Biederman,
Fastboot mailing list, Segher Boessenkool
On Wed, 3 Jan 2007 14:53:26 +0100, Adrian Bunk wrote:
> On Wed, Jan 03, 2007 at 09:46:45AM +0530, Vivek Goyal wrote:
> >
> > o i386 kernel reboots instantly if compiled with binutils older than
> > 2.6.15.
>
> Should that have been "2.15"?
>
> And is the following perhaps the same issue?
>
> Subject : kernel immediately reboots instead of booting
> References : http://lkml.org/lkml/2007/1/2/15
> Submitter : Steve Youngs <steve@youngs.au.com>
> Status : unknown
Indeed this pretty much resembles my problem.
> @Steve:
> You had binutils 2.14.90.0.6 .
> Does this patch fix it for you?
I'd really expect it to, Steve please try the patch and confirm.
--
Jean Delvare
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] i386 kernel instant reboot with older binutils fix
2007-01-03 14:18 ` Vivek Goyal
@ 2007-01-03 15:02 ` Segher Boessenkool
0 siblings, 0 replies; 8+ messages in thread
From: Segher Boessenkool @ 2007-01-03 15:02 UTC (permalink / raw)
To: vgoyal
Cc: Adrian Bunk, Eric W. Biederman, Morton Andrew Morton, Andi Kleen,
Linus Torvalds, Fastboot mailing list, Jean Delvare,
linux kernel mailing list
> Hopefully this patch should solve steve's issue too.
Sure looks like it.
> o Older binutils required explicit flags to mark a section allocatable
> and executable(AX). Newer binutils automatically mark a section AX if
> the name starts with .text.
More exactly, since 2.15 more section names are automatically
recognised as being of a certain type; older binutils already
did this for plain .text, for example. Just a nitpick, but
perhaps it explains the problem better; I'm fine with the
patch as-is.
Segher
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2007-01-03 15:05 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-03 4:16 [PATCH] i386 kernel instant reboot with older binutils fix Vivek Goyal
2007-01-03 6:44 ` Eric W. Biederman
2007-01-03 6:55 ` Vivek Goyal
2007-01-03 7:50 ` Eric W. Biederman
2007-01-03 13:53 ` Adrian Bunk
2007-01-03 14:18 ` Vivek Goyal
2007-01-03 15:02 ` Segher Boessenkool
2007-01-03 14:18 ` Jean Delvare
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox