[Intel-gfx] [PATCH] drm/i915: Prevent context obj from being corrupted

Daniel Vetter daniel at ffwll.ch
Wed Mar 26 08:04:38 CET 2014


On Wed, Mar 26, 2014 at 07:24:16AM +0100, Daniel Vetter wrote:
> On Tue, Mar 25, 2014 at 07:01:50PM -0700, Ben Widawsky wrote:
> > While the context is not being used, we can make the PTEs invalid, so
> > nothing can accidentally corrupt it. Systems tend to have a lot of
> > trouble when the context gets corrupted.
> > 
> > NOTE: This is a slightly different patch than what I posted to Bugzilla.
> > 
> > References: https://bugs.freedesktop.org/show_bug.cgi?id=75724
> > Signed-off-by: Ben Widawsky <ben at bwidawsk.net>
> 
> We could stop the aliasing ppgtt binder from always binding into the
> ppgtt. Which is the bug I'm signed up to fix, and which probably curbs 99%
> of all potential corruption. The last 1% is the kernel getting his
> kmapping wrong ...

Actually your patch doesn't accomplish much, since MI_UPDATE_GTT only
updates the global gtt, not the aliasing ppgtt. Which means that userspace
batches can still happily stomp all over your precious context objects.
See comment #5 in that bug report:

https://bugs.freedesktop.org/show_bug.cgi?id=75724#c5

Cheers, Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch



More information about the Intel-gfx mailing list