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 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.

Thanks,
Jason



[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