Re: [iommufd 2/2] vfio/ap: validate iova during dma_unmap and trigger irq disable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2022/11/29 04:28, Jason Gunthorpe wrote:
On Mon, Nov 28, 2022 at 10:40:48AM -0500, Matthew Rosato wrote:
On 11/24/22 7:59 AM, Jason Gunthorpe wrote:
The iova and length are the range being invalidated, the driver has no
control over them and length is probably multiple pages.

But this test doesn't look right?

    if (iova > q->saved_iova && q->saved_iova < iova + length)>
Since the page was pinned we can assume iova and length are already
PAGE_SIZE aligned.

Yeah, I think that would be fine with a minor tweak to pick up q->saved_iova at the very start of the iova range:

    if (iova >= q->saved_iova && q->saved_iova < iova + length)


Yi can you update and repost this please?

I don't know if we will get a rc8, but we must be prepared with a
final branch by Friday in case not.

done.

https://lore.kernel.org/kvm/20221129093535.359357-1-yi.l.liu@xxxxxxxxx/T/#m261c22a7d9c9b2fe4258c5156f53ea6da97a27c9

--
Regards,
Yi Liu



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux