From: Ingo Molnar <mingo@elte.hu>
To: James Morris <jmorris@namei.org>
Cc: Sam Ravnborg <sam@ravnborg.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
linux-kernel@vger.kernel.org,
Arjan van de Ven <arjan@infradead.org>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>
Subject: Re: Regression [Was: Boot hang with stack protector on x86_64]
Date: Sat, 23 Feb 2008 08:37:46 +0100 [thread overview]
Message-ID: <20080223073746.GA28310@elte.hu> (raw)
In-Reply-To: <20080223061856.GA26185@elte.hu>
* Ingo Molnar <mingo@elte.hu> wrote:
> could you try the fix below ontop of x86.git#testing, does it solve
> your boot hang?
find below another fix that is somewhat better as it does not affect the
native kernel and !PARAVIRT.
btw., this also explains why this bug wasnt reported sooner against
x86.git#testing: people done normally use PARAVIRT on 64-bit yet.
(there is no 64-bit host support)
Ingo
---------------->
Subject: x86: stackprotector & PARAVIRT fix
From: Ingo Molnar <mingo@elte.hu>
Date: Sat Feb 23 07:06:55 CET 2008
on paravirt enabled 64-bit kernels the paravirt ops do function
calls themselves - which is bad with the stackprotector - for
example pda_init() loads 0 into %gs and then does MSR_GS_BASE
write (which modifies gs.base) - but that MSR write is a function
call on paravirt, which with stackprotector tries to read the
stack canary from the PDA ... crashing the bootup.
the solution was suggested by Arjan van de Ven: to exclude paravirt.c
from stackprotector, too many lowlevel functionality is in it. It's
not like we'll have paravirt functions with character arrays on
their stack anyway...
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
arch/x86/kernel/Makefile | 1 +
1 file changed, 1 insertion(+)
Index: linux-x86.q/arch/x86/kernel/Makefile
===================================================================
--- linux-x86.q.orig/arch/x86/kernel/Makefile
+++ linux-x86.q/arch/x86/kernel/Makefile
@@ -15,6 +15,7 @@ nostackp := $(call cc-option, -fno-stack
CFLAGS_vsyscall_64.o := $(PROFILING) -g0 $(nostackp)
CFLAGS_hpet.o := $(nostackp)
CFLAGS_tsc_64.o := $(nostackp)
+CFLAGS_paravirt.o := $(nostackp)
obj-y := process_$(BITS).o signal_$(BITS).o entry_$(BITS).o
obj-y += traps_$(BITS).o irq_$(BITS).o
next prev parent reply other threads:[~2008-02-23 7:38 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-22 0:29 Boot hang with stack protector on x86_64 James Morris
2008-02-22 1:14 ` Arjan van de Ven
2008-02-22 7:59 ` Regression [Was: Boot hang with stack protector on x86_64] Sam Ravnborg
2008-02-22 9:36 ` Ingo Molnar
2008-02-22 10:33 ` James Morris
2008-02-22 12:17 ` Ingo Molnar
2008-02-22 13:02 ` James Morris
2008-02-22 13:27 ` Ingo Molnar
2008-02-23 6:18 ` Ingo Molnar
2008-02-23 7:37 ` Ingo Molnar [this message]
2008-02-24 22:53 ` James Morris
2008-02-25 8:23 ` Ingo Molnar
2008-02-22 15:43 ` Linus Torvalds
2008-02-22 15:59 ` Arjan van de Ven
2008-02-22 16:12 ` Sam Ravnborg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080223073746.GA28310@elte.hu \
--to=mingo@elte.hu \
--cc=arjan@infradead.org \
--cc=hpa@zytor.com \
--cc=jmorris@namei.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=sam@ravnborg.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox