On 9/28/21 8:47 PM, Ricardo Koller wrote: > Verify that the ITS region does not extend beyond the VM-specified IPA > range (phys_size). > > base + size > phys_size AND base < phys_size > > Add the missing check into vgic_its_set_attr() which is called when > setting the region. > > Signed-off-by: Ricardo Koller <ricarkol@xxxxxxxxxx> > --- > arch/arm64/kvm/vgic/vgic-its.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/arch/arm64/kvm/vgic/vgic-its.c b/arch/arm64/kvm/vgic/vgic-its.c > index 61728c543eb9..321743b87002 100644 > --- a/arch/arm64/kvm/vgic/vgic-its.c > +++ b/arch/arm64/kvm/vgic/vgic-its.c > @@ -2710,8 +2710,8 @@ static int vgic_its_set_attr(struct kvm_device *dev, > if (copy_from_user(&addr, uaddr, sizeof(addr))) > return -EFAULT; > > - ret = vgic_check_ioaddr(dev->kvm, &its->vgic_its_base, > - addr, SZ_64K); > + ret = vgic_check_iorange(dev->kvm, &its->vgic_its_base, > + addr, SZ_64K, KVM_VGIC_V3_ITS_SIZE); > if (ret) > return ret; > Reviewed-by: Eric Auger <eric.auger@xxxxxxxxxx> Eric _______________________________________________ kvmarm mailing list kvmarm@xxxxxxxxxxxxxxxxxxxxx https://lists.cs.columbia.edu/mailman/listinfo/kvmarm