[Intel-gfx] [PATCH v3] drm/i915/userptr: Disallow wrapping GTT into a userptr

Chris Wilson chris at chris-wilson.co.uk
Wed Mar 8 21:58:19 UTC 2017


On Wed, Mar 08, 2017 at 05:25:18PM +0000, Chris Wilson wrote:
> On Wed, Mar 08, 2017 at 01:46:35PM +0000, Chris Wilson wrote:
> > On Wed, Mar 08, 2017 at 01:28:31PM +0000, Tvrtko Ursulin wrote:
> > > Okay risking more embarrassing misses, but is this not a false
> > > negative? Userptr created from an equal or smaller than the GTT
> > > mapping would not trigger this return false for some reason?
> > 
> > I was thinking about the case where the vma is far to the right of addr,
> > where it started past end. However, that is now protected by checking
> > vm_start > addr for the first vma. I didn't want a false positive, but
> > yeah this should now be a false negative for a single GTT vma spanning
> > the userptr. Weird that gem_userptr_blits didn't catch that case :|
> 
> Ah, added the boundary tests to gem_userptr_blits/invalid-gtt-mapping
> and by printk confirmed hitting the bug you pointed out. However, the
> igt still passes because we defer to the worker and that generates the
> EFAULT. Catching it as a real error is proving difficult, needs Michal's
> machinery on top of the overlap of neighbouring vma.

Done. I can provoke the deadlock by adding a few more boundary cases to
Michal's tests.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the Intel-gfx mailing list