]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/4.9.169/powerpc-64s-enhance-the-information-in-cpu_show_spec.patch
4.9-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 4.9.169 / powerpc-64s-enhance-the-information-in-cpu_show_spec.patch
CommitLineData
45d80ddf
SL
1From 403103d2fab584f18fbb402a7d0f2bdc81774844 Mon Sep 17 00:00:00 2001
2From: Michal Suchanek <msuchanek@suse.de>
3Date: Thu, 11 Apr 2019 21:46:04 +1000
4Subject: powerpc/64s: Enhance the information in cpu_show_spectre_v1()
5
6commit a377514519b9a20fa1ea9adddbb4129573129cef upstream.
7
8We now have barrier_nospec as mitigation so print it in
9cpu_show_spectre_v1() when enabled.
10
11Signed-off-by: Michal Suchanek <msuchanek@suse.de>
12Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
13Signed-off-by: Sasha Levin <sashal@kernel.org>
14---
15 arch/powerpc/kernel/security.c | 3 +++
16 1 file changed, 3 insertions(+)
17
18diff --git a/arch/powerpc/kernel/security.c b/arch/powerpc/kernel/security.c
19index d0e974da4918..f189f946d935 100644
20--- a/arch/powerpc/kernel/security.c
21+++ b/arch/powerpc/kernel/security.c
22@@ -121,6 +121,9 @@ ssize_t cpu_show_spectre_v1(struct device *dev, struct device_attribute *attr, c
23 if (!security_ftr_enabled(SEC_FTR_BNDS_CHK_SPEC_BAR))
24 return sprintf(buf, "Not affected\n");
25
26+ if (barrier_nospec_enabled)
27+ return sprintf(buf, "Mitigation: __user pointer sanitization\n");
28+
29 return sprintf(buf, "Vulnerable\n");
30 }
31
32--
332.19.1
34