Subject: [PATCH 4.19 093/114] arm64: Add sysfs vulnerability show for spectre-v1

From: Greg Kroah-Hartman <[email-masked]>
Date: Thu, 10 Oct 2019 10:36:40 +0200

From: Mian Yousaf Kaukab <[email-masked]>

[ Upstream commit 3891ebccace188af075ce143d8b072b65e90f695 ]

spectre-v1 has been mitigated and the mitigation is always active.
Report this to userspace via sysfs

Signed-off-by: Mian Yousaf Kaukab <[email-masked]>
Signed-off-by: Jeremy Linton <[email-masked]>
Reviewed-by: Andre Przywara <[email-masked]>
Reviewed-by: Catalin Marinas <[email-masked]>
Tested-by: Stefan Wahren <[email-masked]>
Acked-by: Suzuki K Poulose <[email-masked]>
Signed-off-by: Will Deacon <[email-masked]>
Signed-off-by: Ard Biesheuvel <[email-masked]>
Signed-off-by: Greg Kroah-Hartman <[email-masked]>
---
 arch/arm64/kernel/cpu_errata.c |    6 ++++++
 1 file changed, 6 insertions(+)

--- a/arch/arm64/kernel/cpu_errata.c
+++ b/arch/arm64/kernel/cpu_errata.c
@@ -729,3 +729,9 @@ const struct arm64_cpu_capabilities arm6
 	{
 	}
 };
+
+ssize_t cpu_show_spectre_v1(struct device *dev, struct device_attribute *attr,
+			    char *buf)
+{
+	return sprintf(buf, "Mitigation: __user pointer sanitization\n");
+}

_______________________________________________
linux-arm-kernel mailing list
[email-masked]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel