]> git.ipfire.org Git - people/arne_f/kernel.git/commitdiff
powerpc/fsl: Enable runtime patching if nospectre_v2 boot arg is used
authorDiana Craciun <diana.craciun@nxp.com>
Thu, 11 Apr 2019 11:46:26 +0000 (21:46 +1000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Apr 2019 06:36:43 +0000 (08:36 +0200)
commit 3bc8ea8603ae4c1e09aca8de229ad38b8091fcb3 upstream.

If the user choses not to use the mitigations, replace
the code sequence with nops.

Signed-off-by: Diana Craciun <diana.craciun@nxp.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/powerpc/kernel/setup-common.c

index d5a128f5453778b915b63b2c3656cf926c6e9c7f..5e7d70c5d0650f3d000d602ce0a00c9d20301dca 100644 (file)
@@ -919,6 +919,7 @@ void __init setup_arch(char **cmdline_p)
                ppc_md.setup_arch();
 
        setup_barrier_nospec();
+       setup_spectre_v2();
 
        paging_init();