]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
powerpc64s: Show ori31 availability in spectre_v1 sysfs file not v2
authorMichael Ellerman <mpe@ellerman.id.au>
Mon, 9 Jul 2018 06:25:21 +0000 (16:25 +1000)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Tue, 23 Apr 2019 15:48:54 +0000 (17:48 +0200)
commit361da9a6d317b40a7d4767b726c4d512bc76ca51
treebe74dd03dd01111764649e51a82fcb3031a58968
parenteab927807e2ea8ba16f06ec4e22fdf6f96023220
powerpc64s: Show ori31 availability in spectre_v1 sysfs file not v2

When I added the spectre_v2 information in sysfs, I included the
availability of the ori31 speculation barrier.

Although the ori31 barrier can be used to mitigate v2, it's primarily
intended as a spectre v1 mitigation. Spectre v2 is mitigated by
hardware changes.

So rework the sysfs files to show the ori31 information in the
spectre_v1 file, rather than v2.

Currently we display eg:

  $ grep . spectre_v*
  spectre_v1:Mitigation: __user pointer sanitization
  spectre_v2:Mitigation: Indirect branch cache disabled, ori31 speculation barrier enabled

After:

  $ grep . spectre_v*
  spectre_v1:Mitigation: __user pointer sanitization, ori31 speculation barrier enabled
  spectre_v2:Mitigation: Indirect branch cache disabled

BugLink: https://bugs.launchpad.net/bugs/1822870
Fixes: d6fbe1c55c55 ("powerpc/64s: Wire up cpu_show_spectre_v2()")
Cc: stable@vger.kernel.org # v4.17+
BugLink: https://bugs.launchpad.net/bugs/1822870
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
(cherry picked from commit 6d44acae1937b81cf8115ada8958e04f601f3f2e)
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