Message ID | 1527946539106176@kroah.com (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show |
Series | Patch "powerpc/64s: Wire up cpu_show_spectre_v1()" has been added to the 4.9-stable tree | expand |
--- a/arch/powerpc/kernel/security.c +++ b/arch/powerpc/kernel/security.c @@ -50,3 +50,11 @@ ssize_t cpu_show_meltdown(struct device return sprintf(buf, "Vulnerable\n"); } + +ssize_t cpu_show_spectre_v1(struct device *dev, struct device_attribute *attr, char *buf) +{ + if (!security_ftr_enabled(SEC_FTR_BNDS_CHK_SPEC_BAR)) + return sprintf(buf, "Not affected\n"); + + return sprintf(buf, "Vulnerable\n"); +}