]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - queue-4.4/powerpc-fsl-fix-spectre_v2-mitigations-reporting.patch
4.4-stable patches
[thirdparty/kernel/stable-queue.git] / queue-4.4 / powerpc-fsl-fix-spectre_v2-mitigations-reporting.patch
CommitLineData
4fa5b95e
GKH
1From foo@baz Mon 29 Apr 2019 11:38:37 AM CEST
2From: Michael Ellerman <mpe@ellerman.id.au>
3Date: Mon, 22 Apr 2019 00:20:32 +1000
4Subject: powerpc/fsl: Fix spectre_v2 mitigations reporting
5To: stable@vger.kernel.org, gregkh@linuxfoundation.org
6Cc: linuxppc-dev@ozlabs.org, diana.craciun@nxp.com, msuchanek@suse.de, npiggin@gmail.com, christophe.leroy@c-s.fr
7Message-ID: <20190421142037.21881-48-mpe@ellerman.id.au>
8
9From: Diana Craciun <diana.craciun@nxp.com>
10
11commit 7d8bad99ba5a22892f0cad6881289fdc3875a930 upstream.
12
13Currently for CONFIG_PPC_FSL_BOOK3E the spectre_v2 file is incorrect:
14
15 $ cat /sys/devices/system/cpu/vulnerabilities/spectre_v2
16 "Mitigation: Software count cache flush"
17
18Which is wrong. Fix it to report vulnerable for now.
19
20Fixes: ee13cb249fab ("powerpc/64s: Add support for software count cache flush")
21Cc: stable@vger.kernel.org # v4.19+
22Signed-off-by: Diana Craciun <diana.craciun@nxp.com>
23Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
24Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
25---
26 arch/powerpc/kernel/security.c | 2 +-
27 1 file changed, 1 insertion(+), 1 deletion(-)
28
29--- a/arch/powerpc/kernel/security.c
30+++ b/arch/powerpc/kernel/security.c
31@@ -23,7 +23,7 @@ enum count_cache_flush_type {
32 COUNT_CACHE_FLUSH_SW = 0x2,
33 COUNT_CACHE_FLUSH_HW = 0x4,
34 };
35-static enum count_cache_flush_type count_cache_flush_type;
36+static enum count_cache_flush_type count_cache_flush_type = COUNT_CACHE_FLUSH_NONE;
37
38 bool barrier_nospec_enabled;
39 static bool no_nospec;