]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
powerpc/fsl: Fix spectre_v2 mitigations reporting
authorDiana Craciun <diana.craciun@nxp.com>
Wed, 12 Dec 2018 14:03:02 +0000 (16:03 +0200)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Tue, 23 Apr 2019 15:48:55 +0000 (17:48 +0200)
Currently for CONFIG_PPC_FSL_BOOK3E the spectre_v2 file is incorrect:

  $ cat /sys/devices/system/cpu/vulnerabilities/spectre_v2
  "Mitigation: Software count cache flush"

Which is wrong. Fix it to report vulnerable for now.

BugLink: https://bugs.launchpad.net/bugs/1822870
Fixes: ee13cb249fab ("powerpc/64s: Add support for software count cache flush")
Cc: stable@vger.kernel.org # v4.19+
BugLink: https://bugs.launchpad.net/bugs/1822870
Signed-off-by: Diana Craciun <diana.craciun@nxp.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
(cherry picked from commit 7d8bad99ba5a22892f0cad6881289fdc3875a930)
Signed-off-by: Manoj Iyer <manoj.iyer@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
arch/powerpc/kernel/security.c

index f6f469fc4073e5aada3236e7f1889df05f0e7819..1b395b85132be4c81a3740e7df6761f963df3d5e 100644 (file)
@@ -22,7 +22,7 @@ enum count_cache_flush_type {
        COUNT_CACHE_FLUSH_SW    = 0x2,
        COUNT_CACHE_FLUSH_HW    = 0x4,
 };
-static enum count_cache_flush_type count_cache_flush_type;
+static enum count_cache_flush_type count_cache_flush_type = COUNT_CACHE_FLUSH_NONE;
 
 bool barrier_nospec_enabled;
 static bool no_nospec;