diff options
author | Ryan Roberts <ryan.roberts@arm.com> | 2022-10-27 15:09:45 +0300 |
---|---|---|
committer | Marc Zyngier <maz@kernel.org> | 2022-10-27 21:49:40 +0300 |
commit | b6bcdc9f6b8321e4471ff45413b6410e16762a8d (patch) | |
tree | f67bb883abd47c37f7a9d1914395469c043e01ad /virt | |
parent | 6853a71726b6f5930b4450889faf02e8f1cfe35c (diff) | |
download | linux-b6bcdc9f6b8321e4471ff45413b6410e16762a8d.tar.xz |
KVM: arm64: Fix bad dereference on MTE-enabled systems
enter_exception64() performs an MTE check, which involves dereferencing
vcpu->kvm. While vcpu has already been fixed up to be a HYP VA pointer,
kvm is still a pointer in the kernel VA space.
This only affects nVHE configurations with MTE enabled, as in other
cases, the pointer is either valid (VHE) or not dereferenced (!MTE).
Fix this by first converting kvm to a HYP VA pointer.
Fixes: ea7fc1bb1cd1 ("KVM: arm64: Introduce MTE VM feature")
Signed-off-by: Ryan Roberts <ryan.roberts@arm.com>
Reviewed-by: Steven Price <steven.price@arm.com>
[maz: commit message tidy-up]
Signed-off-by: Marc Zyngier <maz@kernel.org>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20221027120945.29679-1-ryan.roberts@arm.com
Diffstat (limited to 'virt')
0 files changed, 0 insertions, 0 deletions