* [PATCH] x86: Fix vsyscall on gcc 4.5 with -Os
@ 2010-06-18 21:09 Andi Kleen
2010-06-18 22:15 ` [tip:x86/urgent] " tip-bot for Andi Kleen
0 siblings, 1 reply; 2+ messages in thread
From: Andi Kleen @ 2010-06-18 21:09 UTC (permalink / raw)
To: hpa, linux-kernel, ak
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);
^ permalink raw reply [flat|nested] 2+ messages in thread
* [tip:x86/urgent] x86: Fix vsyscall on gcc 4.5 with -Os
2010-06-18 21:09 [PATCH] x86: Fix vsyscall on gcc 4.5 with -Os Andi Kleen
@ 2010-06-18 22:15 ` tip-bot for Andi Kleen
0 siblings, 0 replies; 2+ messages in thread
From: tip-bot for Andi Kleen @ 2010-06-18 22:15 UTC (permalink / raw)
To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, andi, stable, ak, tglx, hpa
Commit-ID: 124482935fb7fb9303c8a8ab930149c6a93d9910
Gitweb: http://git.kernel.org/tip/124482935fb7fb9303c8a8ab930149c6a93d9910
Author: Andi Kleen <andi@firstfloor.org>
AuthorDate: Fri, 18 Jun 2010 23:09:00 +0200
Committer: H. Peter Anvin <hpa@linux.intel.com>
CommitDate: Fri, 18 Jun 2010 14:16:31 -0700
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>
LKML-Reference: <20100618210859.GA10913@basil.fritz.box>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Cc: <stable@kernel.org>
---
arch/x86/include/asm/system.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/x86/include/asm/system.h b/arch/x86/include/asm/system.h
index b8fe48e..e7f4d33 100644
--- a/arch/x86/include/asm/system.h
+++ b/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);
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-06-18 22:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-18 21:09 [PATCH] x86: Fix vsyscall on gcc 4.5 with -Os Andi Kleen
2010-06-18 22:15 ` [tip:x86/urgent] " tip-bot for Andi Kleen
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