From b11de7a29fe26b2dfef15af946a3112346cb4747 Mon Sep 17 00:00:00 2001 From: Tim Chen Date: Wed, 27 Sep 2017 12:09:14 -0700 Subject: [PATCH] x86/feature: Report presence of IBPB and IBRS control CVE-2017-5715 (Spectre v2 Intel) Report presence of IBPB and IBRS. Signed-off-by: Tim Chen Signed-off-by: Andy Whitcroft Signed-off-by: Kleber Sacilotto de Souza Signed-off-by: Andy Whitcroft Acked-by: Colin Ian King Acked-by: Kamal Mostafa Signed-off-by: Khalid Elmously --- arch/x86/kernel/cpu/intel.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/x86/kernel/cpu/intel.c b/arch/x86/kernel/cpu/intel.c index dfa90a3a5145..f1d94c73625a 100644 --- a/arch/x86/kernel/cpu/intel.c +++ b/arch/x86/kernel/cpu/intel.c @@ -627,6 +627,11 @@ static void init_intel(struct cpuinfo_x86 *c) init_intel_energy_perf(c); init_intel_misc_features(c); + + if (boot_cpu_has(X86_FEATURE_SPEC_CTRL)) + printk_once(KERN_INFO "FEATURE SPEC_CTRL Present\n"); + else + printk_once(KERN_INFO "FEATURE SPEC_CTRL Not Present\n"); } #ifdef CONFIG_X86_32 -- 2.39.2