From: Michal Suchanek Date: Mon, 28 May 2018 13:19:14 +0000 (+0200) Subject: powerpc/64s: Enhance the information in cpu_show_spectre_v1() X-Git-Tag: v4.18-rc1~108^2~34 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a377514519b9a20fa1ea9adddbb4129573129cef;p=thirdparty%2Fkernel%2Flinux.git powerpc/64s: Enhance the information in cpu_show_spectre_v1() We now have barrier_nospec as mitigation so print it in cpu_show_spectre_v1() when enabled. Signed-off-by: Michal Suchanek Signed-off-by: Michael Ellerman --- diff --git a/arch/powerpc/kernel/security.c b/arch/powerpc/kernel/security.c index 06d5195f67296..3eb9c45f28d72 100644 --- a/arch/powerpc/kernel/security.c +++ b/arch/powerpc/kernel/security.c @@ -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"); }