Re: [PATCH V4 2/5] vfio/type1: prevent locked_vm underflow

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

 



On Thu, Dec 15, 2022 at 09:38:42AM -0500, Steven Sistare wrote:

> > I'm not sure this is quite, right, or at least the comment isn't quite
> > right..
> > 
> > The issue is that the vfio_dma does not store the mm that provided the
> > pages. By going through the task every time it allows the mm to change
> > under its feet which of course can corrupt the assumed accounting in
> > various ways.
> > 
> > To fix this, the mm should be kept, as you did above. All the code
> > that is touching the task to get the mm should be dropped. The only
> > purpose of the task is to check the rlimit.
> 
> Yes.  While developing my "redo" series I tried it that way, but did not post
> that version.  Functionally it should be equivalent to this series, but I can
> code it again to see if it looks cleaner.

The big reason to split is that this existing bug pre-dates the vaddr
work and should probably be backported further. It can be triggered
just by doing exec..

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