]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: arm64: Patch kimage_voffset instead of loading the EL1 value
authorMarc Zyngier <maz@kernel.org>
Sat, 24 Oct 2020 15:33:38 +0000 (16:33 +0100)
committerMarc Zyngier <maz@kernel.org>
Fri, 27 Nov 2020 11:32:43 +0000 (11:32 +0000)
commite2ac7c25cce98a5ea764c82c72ab7b35f3e4a5bf
tree93f0cc373bf871d0eddcdef77fc5ca0d8bb17c8c
parent33ce9b8d76ed2f52b128eb8426e0a8e05a8f8119
KVM: arm64: Patch kimage_voffset instead of loading the EL1 value

Directly using the kimage_voffset variable is fine for now, but
will become more problematic as we start distrusting EL1.

Instead, patch the kimage_voffset into the HYP text, ensuring
we don't have to load an untrusted value later on.

Signed-off-by: Marc Zyngier <maz@kernel.org>
arch/arm64/include/asm/kvm_mmu.h
arch/arm64/kernel/image-vars.h
arch/arm64/kvm/hyp/nvhe/host.S
arch/arm64/kvm/va_layout.c