diff options
author | Alexey Kardashevskiy <aik@ozlabs.ru> | 2019-09-03 16:16:27 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-09-06 10:22:22 +0200 |
commit | db1841a2dd4c84f390c3e0ed15d6a4ea601433e9 (patch) | |
tree | 213b6658e9d190792648144edbbfc114d8550b53 /virt | |
parent | 938e383738d9752faf6447a9c290739f33683a50 (diff) | |
download | linux-stable-db1841a2dd4c84f390c3e0ed15d6a4ea601433e9.tar.gz linux-stable-db1841a2dd4c84f390c3e0ed15d6a4ea601433e9.tar.bz2 linux-stable-db1841a2dd4c84f390c3e0ed15d6a4ea601433e9.zip |
KVM: PPC: Book3S: Fix incorrect guest-to-user-translation error handling
[ Upstream commit ddfd151f3def9258397fcde7a372205a2d661903 ]
H_PUT_TCE_INDIRECT handlers receive a page with up to 512 TCEs from
a guest. Although we verify correctness of TCEs before we do anything
with the existing tables, there is a small window when a check in
kvmppc_tce_validate might pass and right after that the guest alters
the page of TCEs, causing an early exit from the handler and leaving
srcu_read_lock(&vcpu->kvm->srcu) (virtual mode) or lock_rmap(rmap)
(real mode) locked.
This fixes the bug by jumping to the common exit code with an appropriate
unlock.
Cc: stable@vger.kernel.org # v4.11+
Fixes: 121f80ba68f1 ("KVM: PPC: VFIO: Add in-kernel acceleration for VFIO")
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'virt')
0 files changed, 0 insertions, 0 deletions