]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
UBUNTU: SAUCE: rfi-flush: Fix the fallback flush to actually activate
authorMichael Ellerman <mpe@ellerman.id.au>
Sat, 6 Jan 2018 15:50:16 +0000 (21:20 +0530)
committerMarcelo Henrique Cerri <marcelo.cerri@canonical.com>
Thu, 11 Jan 2018 20:35:24 +0000 (18:35 -0200)
CVE-2017-5754

BugLink: http://bugs.launchpad.net/bugs/1742772
Since we now have three nops, we need to branch further to get over
the nops to the branch to the fallback flush.

Instead of putting the branch in slot 1 and branching by 8, put it in
0 and branch all the way to keep it simple.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Marcelo Henrique Cerri <marcelo.cerri@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
arch/powerpc/lib/feature-fixups.c

index 415c6c9c97aafa20832a351f130490a9222b1492..da477a183f8e03fbfe34eae4d5f13ce270ff6173 100644 (file)
@@ -131,8 +131,8 @@ void do_rfi_flush_fixups(enum l1d_flush_type types)
        instrs[2] = 0x60000000; /* nop */
 
        if (types & L1D_FLUSH_FALLBACK)
-               /* b .+8 to fallback flush */
-               instrs[1] = 0x48000008;
+               /* b .+16 to fallback flush */
+               instrs[0] = 0x48000010;
 
        i = 0;
        if (types & L1D_FLUSH_ORI) {