]> git.itanic.dy.fi Git - linux-stable/commitdiff
powerpc/64s: Enhance the information in cpu_show_spectre_v1()
authorMichal Suchanek <msuchanek@suse.de>
Fri, 29 Mar 2019 11:25:54 +0000 (22:25 +1100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Apr 2019 04:25:12 +0000 (06:25 +0200)
commit a377514519b9a20fa1ea9adddbb4129573129cef upstream.

We now have barrier_nospec as mitigation so print it in
cpu_show_spectre_v1() when enabled.

Signed-off-by: Michal Suchanek <msuchanek@suse.de>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/powerpc/kernel/security.c

index 7553951b500a0432fed4d831446c6167a6cc8457..a8b27736293157e51f6767a62af83b857f654e67 100644 (file)
@@ -120,6 +120,9 @@ ssize_t cpu_show_spectre_v1(struct device *dev, struct device_attribute *attr, c
        if (!security_ftr_enabled(SEC_FTR_BNDS_CHK_SPEC_BAR))
                return sprintf(buf, "Not affected\n");
 
+       if (barrier_nospec_enabled)
+               return sprintf(buf, "Mitigation: __user pointer sanitization\n");
+
        return sprintf(buf, "Vulnerable\n");
 }