diff mbox series

[v4,06/12] arm64: add sysfs vulnerability show for spectre v1

Message ID 20190125180711.1970973-7-jeremy.linton@arm.com
State New
Headers show
Series arm64: add system vulnerability sysfs entries | expand

Commit Message

Jeremy Linton Jan. 25, 2019, 6:07 p.m. UTC
From: Mian Yousaf Kaukab <ykaukab@suse.de>


spectre v1, has been mitigated, and the mitigation is
always active.

Signed-off-by: Mian Yousaf Kaukab <ykaukab@suse.de>

Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>

---
 arch/arm64/kernel/cpu_errata.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

-- 
2.17.2

Comments

Andre Przywara Jan. 31, 2019, 5:52 p.m. UTC | #1
On Fri, 25 Jan 2019 12:07:05 -0600
Jeremy Linton <jeremy.linton@arm.com> wrote:

Hi,

> From: Mian Yousaf Kaukab <ykaukab@suse.de>

> 

> spectre v1, has been mitigated, and the mitigation is

> always active.

> 

> Signed-off-by: Mian Yousaf Kaukab <ykaukab@suse.de>

> Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>

> ---

>  arch/arm64/kernel/cpu_errata.c | 10 ++++++++++

>  1 file changed, 10 insertions(+)

> 

> diff --git a/arch/arm64/kernel/cpu_errata.c b/arch/arm64/kernel/cpu_errata.c

> index de09a3537cd4..ef636acf5604 100644

> --- a/arch/arm64/kernel/cpu_errata.c

> +++ b/arch/arm64/kernel/cpu_errata.c

> @@ -730,3 +730,13 @@ const struct arm64_cpu_capabilities arm64_errata[] = {

>  	{

>  	}

>  };

> +

> +#ifdef CONFIG_GENERIC_CPU_VULNERABILITIES

> +

> +ssize_t cpu_show_spectre_v1(struct device *dev, struct device_attribute *attr,

> +		char *buf)


w/s issue. Other than that:

Reviewed-by: Andre Przywara <andre.przywara@arm.com>


Cheers,
Andre.

> +{

> +	return sprintf(buf, "Mitigation: __user pointer sanitization\n");

> +}

> +

> +#endif
diff mbox series

Patch

diff --git a/arch/arm64/kernel/cpu_errata.c b/arch/arm64/kernel/cpu_errata.c
index de09a3537cd4..ef636acf5604 100644
--- a/arch/arm64/kernel/cpu_errata.c
+++ b/arch/arm64/kernel/cpu_errata.c
@@ -730,3 +730,13 @@  const struct arm64_cpu_capabilities arm64_errata[] = {
 	{
 	}
 };
+
+#ifdef CONFIG_GENERIC_CPU_VULNERABILITIES
+
+ssize_t cpu_show_spectre_v1(struct device *dev, struct device_attribute *attr,
+		char *buf)
+{
+	return sprintf(buf, "Mitigation: __user pointer sanitization\n");
+}
+
+#endif