[lkml]   [2010]   [Jul]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[084/205] x86: Fix vsyscall on gcc 4.5 with -Os
2.6.34-stable review patch.  If anyone has any objections, please let us know.


From: Andi Kleen <>

commit 124482935fb7fb9303c8a8ab930149c6a93d9910 upstream.

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
I believe.

Signed-off-by: Andi Kleen <>
LKML-Reference: <>
Signed-off-by: H. Peter Anvin <>
Signed-off-by: Greg Kroah-Hartman <>

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

--- 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);

 \ /
  Last update: 2010-07-30 19:59    [W:0.381 / U:4.760 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site