]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/4.14.110/powerpc-fsl-enable-runtime-patching-if-nospectre_v2-boot-arg-is-used.patch
Linux 4.9.167
[thirdparty/kernel/stable-queue.git] / releases / 4.14.110 / powerpc-fsl-enable-runtime-patching-if-nospectre_v2-boot-arg-is-used.patch
1 From foo@baz Fri Mar 29 15:53:50 CET 2019
2 From: Michael Ellerman <mpe@ellerman.id.au>
3 Date: Fri, 29 Mar 2019 22:26:16 +1100
4 Subject: powerpc/fsl: Enable runtime patching if nospectre_v2 boot arg is used
5 To: stable@vger.kernel.org, gregkh@linuxfoundation.org
6 Cc: linuxppc-dev@ozlabs.org, diana.craciun@nxp.com, msuchanek@suse.de, christophe.leroy@c-s.fr
7 Message-ID: <20190329112620.14489-29-mpe@ellerman.id.au>
8
9 From: Diana Craciun <diana.craciun@nxp.com>
10
11 commit 3bc8ea8603ae4c1e09aca8de229ad38b8091fcb3 upstream.
12
13 If the user choses not to use the mitigations, replace
14 the code sequence with nops.
15
16 Signed-off-by: Diana Craciun <diana.craciun@nxp.com>
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/setup-common.c | 1 +
21 1 file changed, 1 insertion(+)
22
23 --- a/arch/powerpc/kernel/setup-common.c
24 +++ b/arch/powerpc/kernel/setup-common.c
25 @@ -938,6 +938,7 @@ void __init setup_arch(char **cmdline_p)
26 ppc_md.setup_arch();
27
28 setup_barrier_nospec();
29 + setup_spectre_v2();
30
31 paging_init();
32