]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
powerpc/fsl: Enable runtime patching if nospectre_v2 boot arg is used
authorDiana Craciun <diana.craciun@nxp.com>
Fri, 29 Mar 2019 11:26:16 +0000 (22:26 +1100)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 14 Aug 2019 09:18:49 +0000 (11:18 +0200)
BugLink: https://bugs.launchpad.net/bugs/1838116
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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
arch/powerpc/kernel/setup-common.c

index 981ecafd2bee3373b36ba1db51b5c9cbb61135b3..6928b9c28ebc7c1a3102d0f560c3d6832e9bbdca 100644 (file)
@@ -964,6 +964,7 @@ void __init setup_arch(char **cmdline_p)
                ppc_md.setup_arch();
 
        setup_barrier_nospec();
+       setup_spectre_v2();
 
        paging_init();