Re: [PATCH] drm/i915/gem: Store mmap_offsets in an rbtree rather than a plain list

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

 



Quoting Chris Wilson (2020-01-17 22:00:38)
> Currently we create a new mmap_offset for every call to
> mmap_offset_ioctl. This exposes ourselves to an abusive client that may
> simply create new mmap_offsets ad infinitum, which will exhaust physical
> memory and the virtual address space. In addition to the exhaustion, a
> very long linear list of mmap_offsets causes other clients using the
> object to incur long list walks -- these long lists can also be
> generated by simply having many clients generate their own mmap_offset.
> 
> Switching to an rbtree store for obj->mmo.offsets allows us to use a
> binary search for duplicated mmap_offsets (preventing the exhaustion
> from a trivial malicious client), and also quickly search for matching
> mmap_offsets on object close.
> 
> Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
> Cc: Abdiel Janulgue <abdiel.janulgue@xxxxxxxxxxxxxxx>

Hmm, mmo->file only serves for revoking, duplicating drm_vma_node_revoke
itself. I think we can do better yet.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx



[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux