]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
arm64: mm: Add arm64_kernel_unmapped_at_el0 helper
authorWill Deacon <will.deacon@arm.com>
Tue, 14 Nov 2017 13:58:08 +0000 (13:58 +0000)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Mon, 5 Feb 2018 17:23:01 +0000 (18:23 +0100)
commit69a50778f8600f02c40f7a326e13ed49f4e8094b
tree0ca240b07d5c04d395b3d463275f8b3d08a2f701
parentbe9833d47294fb5a9f0c790be834c782c304740e
arm64: mm: Add arm64_kernel_unmapped_at_el0 helper

CVE-2017-5754 ARM64 KPTI fixes

In order for code such as TLB invalidation to operate efficiently when
the decision to map the kernel at EL0 is determined at runtime, this
patch introduces a helper function, arm64_kernel_unmapped_at_el0, to
determine whether or not the kernel is mapped whilst running in userspace.

Currently, this just reports the value of CONFIG_UNMAP_KERNEL_AT_EL0,
but will later be hooked up to a fake CPU capability using a static key.

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 fc0e1299da548b32440051f58f08e0c1eb7edd0b)
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/mmu.h