]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
arm64: entry: Add fake CPU feature for unmapping the kernel at EL0
authorWill Deacon <will.deacon@arm.com>
Tue, 14 Nov 2017 14:38:19 +0000 (14:38 +0000)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Mon, 5 Feb 2018 17:23:02 +0000 (18:23 +0100)
commit8b46d7a45135d5e5d271f6ae1a2fdbf49f5a5cf7
tree82f2660fd550ffce8702f3ebd50209ef6b6979b8
parent7144db30a62db929571714349bbf270eae2b9a23
arm64: entry: Add fake CPU feature for unmapping the kernel at EL0

CVE-2017-5754 ARM64 KPTI fixes

Allow explicit disabling of the entry trampoline on the kernel command
line (kpti=off) by adding a fake CPU feature (ARM64_UNMAP_KERNEL_AT_EL0)
that can be used to toggle the alternative sequences in our entry code and
avoid use of the trampoline altogether if desired. This also allows us to
make use of a static key in arm64_kernel_unmapped_at_el0().

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>
(backported from commit ea1e3de85e94d711f63437c04624aa0e8de5c8b3)
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/cpucaps.h
arch/arm64/include/asm/mmu.h
arch/arm64/kernel/cpufeature.c
arch/arm64/kernel/entry.S