Re: [Intel-gfx] [PATCH 4/4] i915: fix remap_io_sg to verify the pgprot

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

 




On 5/18/21 3:23 PM, Christoph Hellwig wrote:
On Mon, May 17, 2021 at 11:46:35PM +0200, Thomas Hellström wrote:
Apart from the caching aliasing Mattew brought up, doesn't the
remap_pfn_range_xxx() family require the mmap_sem held in write mode since
it modifies the vma structure? remap_io_sg() is called from the fault
handler with the mmap_sem held in read mode only.
Only for vma->vm_flags, and remap_sg already asserts all the interesting
flags are set, although it does not assert VM_IO.

We could move the assignment out of remap_pfn_range_notrack and
into remap_pfn_range and just assert that the proper flags are set,
though.

That to me sounds like a way forward. It sound like in general a gpu prefaulting helper that in the long run also supports faulting huge ptes is desired also by TTM. Although it looks like that BUG_ON() I pointed out was hit anyway....

/Thomas





[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux