From: Mian Yousaf Kaukab Date: Mon, 15 Apr 2019 21:21:21 +0000 (-0500) Subject: arm64: Add sysfs vulnerability show for spectre-v1 X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=3891ebccace188af075ce143d8b072b65e90f695;p=openwrt%2Fstaging%2Fblogic.git arm64: Add sysfs vulnerability show for spectre-v1 spectre-v1 has been mitigated and the mitigation is always active. Report this to userspace via sysfs Signed-off-by: Mian Yousaf Kaukab Signed-off-by: Jeremy Linton Reviewed-by: Andre Przywara Reviewed-by: Catalin Marinas Tested-by: Stefan Wahren Acked-by: Suzuki K Poulose Signed-off-by: Will Deacon --- diff --git a/arch/arm64/kernel/cpu_errata.c b/arch/arm64/kernel/cpu_errata.c index d2b2c69d31bb..cf623657cf3c 100644 --- a/arch/arm64/kernel/cpu_errata.c +++ b/arch/arm64/kernel/cpu_errata.c @@ -755,3 +755,9 @@ const struct arm64_cpu_capabilities arm64_errata[] = { { } }; + +ssize_t cpu_show_spectre_v1(struct device *dev, struct device_attribute *attr, + char *buf) +{ + return sprintf(buf, "Mitigation: __user pointer sanitization\n"); +}