Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c0091073 authored by Marc Zyngier's avatar Marc Zyngier
Browse files

KVM: arm64: vgic-its: Fix handling of indirect tables



The current code will fail on valid indirect tables, and happily
use the ones that are pointing out of the guest RAM. Funny what a
small "!" can do for you...

Signed-off-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
parent d97594e6
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -702,7 +702,7 @@ static bool vgic_its_check_device_id(struct kvm *kvm, struct vgic_its *its,
		return false;

	/* Each 1st level entry is represented by a 64-bit value. */
	if (!kvm_read_guest(kvm,
	if (kvm_read_guest(kvm,
			   BASER_ADDRESS(r) + index * sizeof(indirect_ptr),
			   &indirect_ptr, sizeof(indirect_ptr)))
		return false;