[lkml]   [2018]   [Mar]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH 3.16 05/76] x86/cpufeatures: Add X86_BUG_CPU_INSECURE
3.16.56-rc1 review patch.  If anyone has any objections, please let me know.


From: Thomas Gleixner <>

commit a89f040fa34ec9cd682aed98b8f04e3c47d998bd upstream.

Many x86 CPUs leak information to user space due to missing isolation of
user space and kernel space page tables. There are many well documented
ways to exploit that.

The upcoming software migitation of isolating the user and kernel space
page tables needs a misfeature flag so code can be made runtime

Add the BUG bits which indicates that the CPU is affected and add a feature
bit which indicates that the software migitation is enabled.

Assume for now that _ALL_ x86 CPUs are affected by this. Exceptions can be
made later.

Signed-off-by: Thomas Gleixner <>
Cc: Andy Lutomirski <>
Cc: Boris Ostrovsky <>
Cc: Borislav Petkov <>
Cc: Brian Gerst <>
Cc: Dave Hansen <>
Cc: David Laight <>
Cc: Denys Vlasenko <>
Cc: Eduardo Valentin <>
Cc: Greg KH <>
Cc: H. Peter Anvin <>
Cc: Josh Poimboeuf <>
Cc: Juergen Gross <>
Cc: Linus Torvalds <>
Cc: Peter Zijlstra <>
Cc: Will Deacon <>
Signed-off-by: Ingo Molnar <>
[bwh: Backported to 3.16: assign the first available bug number]
Signed-off-by: Ben Hutchings <>
--- a/arch/x86/include/asm/cpufeature.h
+++ b/arch/x86/include/asm/cpufeature.h
@@ -241,6 +241,7 @@
#define X86_BUG_COMA X86_BUG(2) /* Cyrix 6x86 coma */
#define X86_BUG_AMD_TLB_MMATCH X86_BUG(3) /* AMD Erratum 383 */
#define X86_BUG_AMD_APIC_C1E X86_BUG(4) /* AMD Erratum 400 */
+#define X86_BUG_CPU_INSECURE X86_BUG(5) /* CPU is insecure and needs kernel page table isolation */

#if defined(__KERNEL__) && !defined(__ASSEMBLY__)

--- a/arch/x86/kernel/cpu/common.c
+++ b/arch/x86/kernel/cpu/common.c
@@ -804,6 +804,9 @@ static void __init early_identify_cpu(st

+ /* Assume for now that ALL x86 CPUs are insecure */
+ setup_force_cpu_bug(X86_BUG_CPU_INSECURE);

void __init early_cpu_init(void)
 \ /
  Last update: 2018-03-12 04:08    [W:0.233 / U:32.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site