]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
powerpc/64s: Enhance the information in cpu_show_spectre_v1()
authorMichal Suchanek <msuchanek@suse.de>
Thu, 11 Apr 2019 11:46:04 +0000 (21:46 +1000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Apr 2019 06:36:40 +0000 (08:36 +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: Sasha Levin <sashal@kernel.org>
arch/powerpc/kernel/security.c

index d0e974da49182b41c27eaff7d6534dd85d977c9a..f189f946d935e62e0bb1fadc22d550f211952f73 100644 (file)
@@ -121,6 +121,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");
 }