Re: [PATCH 3/3] drm/i915: Catch dirt in unused execbuffer fields

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Apr 23, 2014 at 08:32:20PM +0200, Daniel Vetter wrote:
> We need to make sure that userspace keeps on following the contract,
> otherwise we won't be able to use the reserved fields at all.
> 
> Testcase: igt/gem_exec_params/*-dirt
> Signed-off-by: Daniel Vetter <daniel.vetter@xxxxxxxx>
> ---
>  drivers/gpu/drm/i915/i915_gem_execbuffer.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
> index c2e5d39a1df8..0f0aebdd8dbd 100644
> --- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c
> +++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
> @@ -1115,6 +1115,9 @@ i915_gem_do_execbuffer(struct drm_device *dev, void *data,
>  			ret = -EFAULT;
>  			goto pre_mutex_err;
>  		}
> +	} else {
> +		if (args->DR1 || args->DR4 || args->cliprects_ptr)
> +			return -EINVAL;

We're inside a mutex here.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux