[SRU][Trusty][PATCH 1/1] UBUNTU: SAUCE: x86: Use barrier_nospec in arch/x86/um/asm/barrier.h
Juerg Haefliger
juerg.haefliger at canonical.com
Fri Jul 27 12:49:52 UTC 2018
BugLink: https://bugs.launchpad.net/bugs/1774181
Modify the duplicate rdtsc_barrier() in arch/x86/um/asm/barrier.h.
Fixes: b3d7ad85b80b ("x86: Introduce barrier_nospec")
Signed-off-by: Juerg Haefliger <juergh at canonical.com>
---
arch/x86/um/asm/barrier.h | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/x86/um/asm/barrier.h b/arch/x86/um/asm/barrier.h
index 7d01b8c56c00..f16760f3d848 100644
--- a/arch/x86/um/asm/barrier.h
+++ b/arch/x86/um/asm/barrier.h
@@ -68,8 +68,7 @@
*/
static inline void rdtsc_barrier(void)
{
- alternative(ASM_NOP3, "mfence", X86_FEATURE_MFENCE_RDTSC);
- alternative(ASM_NOP3, "lfence", X86_FEATURE_LFENCE_RDTSC);
+ barrier_nospec();
}
#endif
--
2.17.1
More information about the kernel-team
mailing list