All of lore.kernel.org
 help / color / mirror / Atom feed
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 07:18:56 +0100	[thread overview]
Message-ID: <20080223061856.GA26185@elte.hu> (raw)
In-Reply-To: <Xine.LNX.4.64.0802230000470.14729@us.intercode.com.au>


James,

could you try the fix below ontop of x86.git#testing, does it solve your 
boot hang?

	Ingo

--------------->
Subject: x86: stackprotector fix: do not zap %gs
From: Ingo Molnar <mingo@elte.hu>
Date: Sat Feb 23 07:06:55 CET 2008

pda_init() puts 0 into %gs - that's wrong because any %gs access will 
fault from now on and we already have a dummy PDA set up that can be 
accessed just fine.

This normally does not matter because almost nothing accesses %gs this 
early ... but the stackprotector now does to read the canary ...

Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 arch/x86/kernel/setup64.c |    2 --
 1 file changed, 2 deletions(-)

Index: linux-x86.q/arch/x86/kernel/setup64.c
===================================================================
--- linux-x86.q.orig/arch/x86/kernel/setup64.c
+++ linux-x86.q/arch/x86/kernel/setup64.c
@@ -165,8 +165,6 @@ void pda_init(int cpu)
 { 
 	struct x8664_pda *pda = cpu_pda(cpu);
 
-	/* Setup up data that may be needed in __get_free_pages early */
-	asm volatile("movl %0,%%fs ; movl %0,%%gs" :: "r" (0)); 
 	/* Memory clobbers used to order PDA accessed */
 	mb();
 	wrmsrl(MSR_GS_BASE, pda);

  parent reply	other threads:[~2008-02-23  6:19 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 [this message]
2008-02-23  7:37             ` Ingo Molnar
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=20080223061856.GA26185@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 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.