]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
arm64: mm: Rename post_ttbr0_update_workaround
authorWill Deacon <will.deacon@arm.com>
Thu, 10 Aug 2017 12:34:30 +0000 (13:34 +0100)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Mon, 5 Feb 2018 17:23:01 +0000 (18:23 +0100)
CVE-2017-5754 ARM64 KPTI fixes

The post_ttbr0_update_workaround hook applies to any change to TTBRx_EL1.
Since we're using TTBR1 for the ASID, rename the hook to make it clearer
as to what it's doing.

Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Tested-by: Laura Abbott <labbott@redhat.com>
Tested-by: Shanker Donthineni <shankerd@codeaurora.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
(cherry picked from commit 158d495899ce55db453f682a8ac8390d5a426578)
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
Acked-by: Brad Figg <brad.figg@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
arch/arm64/include/asm/assembler.h
arch/arm64/kernel/entry.S
arch/arm64/mm/proc.S

index e1fa5db858b7f6ea09a7cea75a80ca33fb195ec9..c45bc94f15d0a1224fdc1f156a058b28db2ed0f9 100644 (file)
@@ -477,10 +477,9 @@ alternative_endif
        .endm
 
 /*
-/*
- * Errata workaround post TTBR0_EL1 update.
+ * Errata workaround post TTBRx_EL1 update.
  */
-       .macro  post_ttbr0_update_workaround
+       .macro  post_ttbr_update_workaround
 #ifdef CONFIG_CAVIUM_ERRATUM_27456
 alternative_if ARM64_WORKAROUND_CAVIUM_27456
        ic      iallu
index bfa4bd09110a83ee0b42c29e33585907b7a11657..a2e3ee450bb0ba0e228e27cdeba49d661532c120 100644 (file)
@@ -257,7 +257,7 @@ alternative_else_nop_endif
         * Cavium erratum 27456 (broadcast TLBI instructions may cause I-cache
         * corruption).
         */
-       post_ttbr0_update_workaround
+       post_ttbr_update_workaround
        .endif
 1:
        .if     \el != 0
index f2ff0837577c0483adcf684227bceb2f364d63d1..3146dc96f05b3c2a880707a0ac801c0f39eaa8dd 100644 (file)
@@ -145,7 +145,7 @@ ENTRY(cpu_do_switch_mm)
        isb
        msr     ttbr0_el1, x0                   // now update TTBR0
        isb
-       post_ttbr0_update_workaround
+       post_ttbr_update_workaround
        ret
 ENDPROC(cpu_do_switch_mm)