mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andi Kleen <andi@firstfloor.org>
To: hpa@zytor.com, linux-kernel@vger.kernel.org, ak@linux.intel.com
Subject: [PATCH] x86: Fix vsyscall on gcc 4.5 with -Os
Date: Fri, 18 Jun 2010 23:09:00 +0200	[thread overview]
Message-ID: <20100618210859.GA10913@basil.fritz.box> (raw)

x86: Fix vsyscall on gcc 4.5 with -Os

This fixes the -Os breaks with gcc 4.5 bug.
rdtsc_barrier needs to be force inlined, otherwise
user space will jump into kernel space and kill init.

This also addresses 
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44129
I believe

Signed-off-by: Andi Kleen <ak@linux.intel.com>

---
 arch/x86/include/asm/system.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-2.6.34-ak/arch/x86/include/asm/system.h
===================================================================
--- linux-2.6.34-ak.orig/arch/x86/include/asm/system.h
+++ linux-2.6.34-ak/arch/x86/include/asm/system.h
@@ -451,7 +451,7 @@ void stop_this_cpu(void *dummy);
  *
  * (Could use an alternative three way for this if there was one.)
  */
-static inline void rdtsc_barrier(void)
+static __always_inline void rdtsc_barrier(void)
 {
 	alternative(ASM_NOP3, "mfence", X86_FEATURE_MFENCE_RDTSC);
 	alternative(ASM_NOP3, "lfence", X86_FEATURE_LFENCE_RDTSC);

             reply	other threads:[~2010-06-18 21:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-18 21:09 Andi Kleen [this message]
2010-06-18 22:15 ` [tip:x86/urgent] " tip-bot for Andi Kleen

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=20100618210859.GA10913@basil.fritz.box \
    --to=andi@firstfloor.org \
    --cc=ak@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.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

Powered by JetHome