x86/speculation/mds: Fix documentation typo
[linux/fpc-iii.git] / arch / s390 / kernel / nospec-sysfs.c
blob8affad5f18cb5df637754f192ae5d8bce9387eba
1 // SPDX-License-Identifier: GPL-2.0
2 #include <linux/device.h>
3 #include <linux/cpu.h>
4 #include <asm/facility.h>
5 #include <asm/nospec-branch.h>
7 ssize_t cpu_show_spectre_v1(struct device *dev,
8 struct device_attribute *attr, char *buf)
10 return sprintf(buf, "Mitigation: __user pointer sanitization\n");
13 ssize_t cpu_show_spectre_v2(struct device *dev,
14 struct device_attribute *attr, char *buf)
16 if (IS_ENABLED(CC_USING_EXPOLINE) && !nospec_disable)
17 return sprintf(buf, "Mitigation: execute trampolines\n");
18 if (__test_facility(82, S390_lowcore.alt_stfle_fac_list))
19 return sprintf(buf, "Mitigation: limited branch prediction\n");
20 return sprintf(buf, "Vulnerable\n");