[Intel-gfx] [PATCH] drm/i915: Reject garbage in unsed ctx create/destroy fields

Daniel Vetter daniel at ffwll.ch
Wed Feb 11 03:28:17 PST 2015


On Wed, Feb 11, 2015 at 10:01:33AM +0000, Chris Wilson wrote:
> On Wed, Feb 11, 2015 at 08:44:47AM +0100, Daniel Vetter wrote:
> > Forgotten ever since, but luckily we're at least good at memset.
> > 
> > Testecase: igt/gem_ctx_create/invalid-pad
> > Testecase: igt/gem_ctx_bad_destroy/invalid-pad
> > Signed-off-by: Daniel Vetter <daniel.vetter at intel.com>
> 
> I wonder if we used mbz instead of pad, we would have a slightly more
> obvious reminder to zero the fields.
> 
> Looks like pad is only cleared fortuituosly in current userspace though.

Oops, VG_CLEAR isn't as good as I've thought. Time to write more patches I
guess. But I expect that most compile libdrm with valgrind support, so I
still think we could try this out for 3.21 and see what happens ...
-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