]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - queue-4.4/powerpc-64s-enhance-the-information-in-cpu_show_spectre_v1.patch
4.4-stable patches
[thirdparty/kernel/stable-queue.git] / queue-4.4 / powerpc-64s-enhance-the-information-in-cpu_show_spectre_v1.patch
1 From foo@baz Mon 29 Apr 2019 11:38:37 AM CEST
2 From: Michael Ellerman <mpe@ellerman.id.au>
3 Date: Mon, 22 Apr 2019 00:20:16 +1000
4 Subject: powerpc/64s: Enhance the information in cpu_show_spectre_v1()
5 To: stable@vger.kernel.org, gregkh@linuxfoundation.org
6 Cc: linuxppc-dev@ozlabs.org, diana.craciun@nxp.com, msuchanek@suse.de, npiggin@gmail.com, christophe.leroy@c-s.fr
7 Message-ID: <20190421142037.21881-32-mpe@ellerman.id.au>
8
9 From: Michal Suchanek <msuchanek@suse.de>
10
11 commit a377514519b9a20fa1ea9adddbb4129573129cef upstream.
12
13 We now have barrier_nospec as mitigation so print it in
14 cpu_show_spectre_v1() when enabled.
15
16 Signed-off-by: Michal Suchanek <msuchanek@suse.de>
17 Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
18 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
19 ---
20 arch/powerpc/kernel/security.c | 3 +++
21 1 file changed, 3 insertions(+)
22
23 --- a/arch/powerpc/kernel/security.c
24 +++ b/arch/powerpc/kernel/security.c
25 @@ -121,6 +121,9 @@ ssize_t cpu_show_spectre_v1(struct devic
26 if (!security_ftr_enabled(SEC_FTR_BNDS_CHK_SPEC_BAR))
27 return sprintf(buf, "Not affected\n");
28
29 + if (barrier_nospec_enabled)
30 + return sprintf(buf, "Mitigation: __user pointer sanitization\n");
31 +
32 return sprintf(buf, "Vulnerable\n");
33 }
34