kernel-fxtec-pro1x/arch/arm64
Mark Rutland cc33c4e201 arm64/kvm: Prohibit guest LOR accesses
We don't currently limit guest accesses to the LOR registers, which we
neither virtualize nor context-switch. As such, guests are provided with
unusable information/controls, and are not isolated from each other (or
the host).

To prevent these issues, we can trap register accesses and present the
illusion LORegions are unssupported by the CPU. To do this, we mask
ID_AA64MMFR1.LO, and set HCR_EL2.TLOR to trap accesses to the following
registers:

* LORC_EL1
* LOREA_EL1
* LORID_EL1
* LORN_EL1
* LORSA_EL1

... when trapped, we inject an UNDEFINED exception to EL1, simulating
their non-existence.

As noted in D7.2.67, when no LORegions are implemented, LoadLOAcquire
and StoreLORelease must behave as LoadAcquire and StoreRelease
respectively. We can ensure this by clearing LORC_EL1.EN when a CPU's
EL2 is first initialized, as the host kernel will not modify this.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Vladimir Murzin <vladimir.murzin@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Christoffer Dall <christoffer.dall@linaro.org>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: kvmarm@lists.cs.columbia.edu
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
2018-02-26 10:48:01 +01:00
..
boot ARM: SoC device tree updates for 4.16 2018-02-01 16:07:54 -08:00
configs ARM: SoC platform updates for 4.16 2018-02-01 16:17:40 -08:00
crypto crypto: arm64/sha512 - fix/improve new v8.2 Crypto Extensions code 2018-01-26 01:10:36 +11:00
include arm64/kvm: Prohibit guest LOR accesses 2018-02-26 10:48:01 +01:00
kernel arm64/kvm: Prohibit guest LOR accesses 2018-02-26 10:48:01 +01:00
kvm arm64/kvm: Prohibit guest LOR accesses 2018-02-26 10:48:01 +01:00
lib arm64: uaccess: Mask __user pointers for __arch_{clear, copy_*}_user 2018-02-06 22:53:40 +00:00
mm arm64: Enforce BBM for huge IO/VMAP mappings 2018-02-22 11:25:53 +00:00
net bpf, arm64: fix out of bounds access in tail call 2018-02-22 16:06:28 -08:00
xen arm64: mm: Add additional parameter to uaccess_ttbr0_disable 2018-01-17 13:57:49 +01:00
Kconfig arm64: Add software workaround for Falkor erratum 1041 2018-02-06 22:53:13 +00:00
Kconfig.debug
Kconfig.platforms clk: meson-axg: add clock controller drivers 2017-12-14 10:19:37 +01:00
Makefile arm64: ftrace: emit ftrace-mod.o contents through code 2017-12-01 13:04:59 +00:00