[Intel-gfx] [PATCH] intel: make sure VG_CLEAR() will always do memory clear
Damien Lespiau
damien.lespiau at intel.com
Wed Nov 20 17:59:22 CET 2013
On Wed, Nov 20, 2013 at 11:53:54PM +0800, Zhenyu Wang wrote:
> > VG_CLEAR() is really just for valgrind. If you need to set some specific
> > variable/field to 0 then you need to set it to 0 and not rely on
> > VG_CLEAR() to do it for you.
> >
>
> ok, in valgrind case it does memory clear for ioctl args which I think is
> good behavior in non-valgrind case too.
Ian just submitted a patch that memset the whole structure.
> > What's the actual issue you have?
> >
>
> During testing on recent get reset status ioctl, if !HAVE_VALGRIND, stats
> argument is not cleared, which failed in kernel check.
Right, so the fix is (was) to zero the fields checked by the kernel
explicitely, not change the VG() macro, which is just used in testing
(and it should this way).
HTH,
--
Damien
More information about the Intel-gfx
mailing list