[Intel-gfx] [PATCH] drm/i915: Restrict pagefault disabling to just around copy_from_user()

Chris Wilson chris at chris-wilson.co.uk
Tue Oct 18 09:00:42 UTC 2016


On Tue, Oct 18, 2016 at 09:54:23AM +0100, Tvrtko Ursulin wrote:
> On 18/10/2016 09:38, Chris Wilson wrote:
> >>>(a) it is safe to do so, and I can legitimately setup userspace to use
> >>>this
> >>How what where? :)
> >igt, whereelse, has a test case to check we can execute from read only
> >memory.
> 
> With relocations?

Yes. The layout is advisory.
 
> >>>(b) reporting an error after we have committed the change is broken
> >>>anyway.
> >>You mean in the half way through cases?
> >We've already made the user/gpu visible change. Failing here is broken.
> >(User doesn't notice the change, presumed_offset doesn't match actual,
> >kernel is oblivious to mismatch, GPU hangs.)
> 
> How is that? I see a error path propagating all the way up to
> failing the execbuf.

The change has already been committed to the object, but the user is not
informed and so on the next pass everyone is oblivious that the value in
the buffer no longer matches (and so can pass through unscathed resulting
in a hang). The error handling itself is fragile.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the Intel-gfx mailing list