]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
Revert "x86/cpu: Implement CPU vulnerabilites sysfs functions"
authorKleber Sacilotto de Souza <kleber.souza@canonical.com>
Fri, 12 Jan 2018 10:36:01 +0000 (11:36 +0100)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Fri, 12 Jan 2018 11:04:46 +0000 (12:04 +0100)
CVE-2017-5754

This reverts commit 7e4c83e48151935197387bc98ac893c590b25b6d.

The upstream commits are not ready yet to display mitigation status for
spectre_v1 and spectre_v2, so revert this commit to avoid confusion.

Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
arch/x86/Kconfig
arch/x86/kernel/cpu/bugs.c

index debe0de398dfbcda87342e6cc3f4f347e95c5654..51003e53e73880358dfc8762c9f7762bf4db1f5f 100644 (file)
@@ -87,7 +87,6 @@ config X86
        select GENERIC_CLOCKEVENTS_MIN_ADJUST
        select GENERIC_CMOS_UPDATE
        select GENERIC_CPU_AUTOPROBE
-       select GENERIC_CPU_VULNERABILITIES
        select GENERIC_EARLY_IOREMAP
        select GENERIC_FIND_FIRST_BIT
        select GENERIC_IOMAP
index 6b27db407a3497f6f8326bd3e25184f88f47845e..0af86d9242da0f6882f1f5252dfa659038c627ac 100644 (file)
@@ -9,7 +9,6 @@
  */
 #include <linux/init.h>
 #include <linux/utsname.h>
-#include <linux/cpu.h>
 #include <asm/bugs.h>
 #include <asm/processor.h>
 #include <asm/processor-flags.h>
@@ -60,31 +59,3 @@ void __init check_bugs(void)
                set_memory_4k((unsigned long)__va(0), 1);
 #endif
 }
-
-#ifdef CONFIG_SYSFS
-ssize_t cpu_show_meltdown(struct device *dev,
-                         struct device_attribute *attr, char *buf)
-{
-       if (!boot_cpu_has_bug(X86_BUG_CPU_MELTDOWN))
-               return sprintf(buf, "Not affected\n");
-       if (boot_cpu_has(X86_FEATURE_PTI))
-               return sprintf(buf, "Mitigation: PTI\n");
-       return sprintf(buf, "Vulnerable\n");
-}
-
-ssize_t cpu_show_spectre_v1(struct device *dev,
-                           struct device_attribute *attr, char *buf)
-{
-       if (!boot_cpu_has_bug(X86_BUG_SPECTRE_V1))
-               return sprintf(buf, "Not affected\n");
-       return sprintf(buf, "Vulnerable\n");
-}
-
-ssize_t cpu_show_spectre_v2(struct device *dev,
-                           struct device_attribute *attr, char *buf)
-{
-       if (!boot_cpu_has_bug(X86_BUG_SPECTRE_V2))
-               return sprintf(buf, "Not affected\n");
-       return sprintf(buf, "Vulnerable\n");
-}
-#endif