From 72edc9efbd13306cedcaee4416fa48cf6389e837 Mon Sep 17 00:00:00 2001 From: Connor Kuehl Date: Mon, 18 Nov 2019 13:36:27 -0800 Subject: [PATCH] UBUNTU: SAUCE: Revert "x86/speculation/taa: Add sysfs reporting for TSX Async Abort" BugLink: https://bugs.launchpad.net/bugs/1852338 This reverts commit c0bafe1e6f7819bfbbae160ac1858fec415c301a in favor of the version from an upstream stable update. Signed-off-by: Connor Kuehl Signed-off-by: Stefan Bader --- arch/x86/kernel/cpu/bugs.c | 23 ----------------------- drivers/base/cpu.c | 9 --------- include/linux/cpu.h | 3 --- 3 files changed, 35 deletions(-) diff --git a/arch/x86/kernel/cpu/bugs.c b/arch/x86/kernel/cpu/bugs.c index 78b0d39d78cd..bf9532a7cc2e 100644 --- a/arch/x86/kernel/cpu/bugs.c +++ b/arch/x86/kernel/cpu/bugs.c @@ -1436,21 +1436,6 @@ static ssize_t mds_show_state(char *buf) sched_smt_active() ? "vulnerable" : "disabled"); } -static ssize_t tsx_async_abort_show_state(char *buf) -{ - if ((taa_mitigation == TAA_MITIGATION_TSX_DISABLED) || - (taa_mitigation == TAA_MITIGATION_OFF)) - return sprintf(buf, "%s\n", taa_strings[taa_mitigation]); - - if (boot_cpu_has(X86_FEATURE_HYPERVISOR)) { - return sprintf(buf, "%s; SMT Host state unknown\n", - taa_strings[taa_mitigation]); - } - - return sprintf(buf, "%s; SMT %s\n", taa_strings[taa_mitigation], - sched_smt_active() ? "vulnerable" : "disabled"); -} - static char *stibp_state(void) { if (spectre_v2_enabled == SPECTRE_V2_IBRS_ENHANCED) @@ -1521,9 +1506,6 @@ static ssize_t cpu_show_common(struct device *dev, struct device_attribute *attr case X86_BUG_MDS: return mds_show_state(buf); - case X86_BUG_TAA: - return tsx_async_abort_show_state(buf); - default: break; } @@ -1560,9 +1542,4 @@ ssize_t cpu_show_mds(struct device *dev, struct device_attribute *attr, char *bu { return cpu_show_common(dev, attr, buf, X86_BUG_MDS); } - -ssize_t cpu_show_tsx_async_abort(struct device *dev, struct device_attribute *attr, char *buf) -{ - return cpu_show_common(dev, attr, buf, X86_BUG_TAA); -} #endif diff --git a/drivers/base/cpu.c b/drivers/base/cpu.c index 0fccd8c0312e..cc37511de866 100644 --- a/drivers/base/cpu.c +++ b/drivers/base/cpu.c @@ -554,20 +554,12 @@ ssize_t __weak cpu_show_mds(struct device *dev, return sprintf(buf, "Not affected\n"); } -ssize_t __weak cpu_show_tsx_async_abort(struct device *dev, - struct device_attribute *attr, - char *buf) -{ - return sprintf(buf, "Not affected\n"); -} - static DEVICE_ATTR(meltdown, 0444, cpu_show_meltdown, NULL); static DEVICE_ATTR(spectre_v1, 0444, cpu_show_spectre_v1, NULL); static DEVICE_ATTR(spectre_v2, 0444, cpu_show_spectre_v2, NULL); static DEVICE_ATTR(spec_store_bypass, 0444, cpu_show_spec_store_bypass, NULL); static DEVICE_ATTR(l1tf, 0444, cpu_show_l1tf, NULL); static DEVICE_ATTR(mds, 0444, cpu_show_mds, NULL); -static DEVICE_ATTR(tsx_async_abort, 0444, cpu_show_tsx_async_abort, NULL); static struct attribute *cpu_root_vulnerabilities_attrs[] = { &dev_attr_meltdown.attr, @@ -576,7 +568,6 @@ static struct attribute *cpu_root_vulnerabilities_attrs[] = { &dev_attr_spec_store_bypass.attr, &dev_attr_l1tf.attr, &dev_attr_mds.attr, - &dev_attr_tsx_async_abort.attr, NULL }; diff --git a/include/linux/cpu.h b/include/linux/cpu.h index 1872b15bda75..fcb1386bb0d4 100644 --- a/include/linux/cpu.h +++ b/include/linux/cpu.h @@ -59,9 +59,6 @@ extern ssize_t cpu_show_l1tf(struct device *dev, struct device_attribute *attr, char *buf); extern ssize_t cpu_show_mds(struct device *dev, struct device_attribute *attr, char *buf); -extern ssize_t cpu_show_tsx_async_abort(struct device *dev, - struct device_attribute *attr, - char *buf); extern __printf(4, 5) struct device *cpu_device_create(struct device *parent, void *drvdata, -- 2.39.5