[Intel-gfx] [drm-intel:for-linux-next-fixes 3/4] drivers/gpu/drm/i915/i915_gem_execbuffer.c:1419:47: sparse: incorrect type in initializer (different address spaces)
Daniel Vetter
daniel.vetter at ffwll.ch
Sun May 25 23:13:14 CEST 2014
Adding intel-gfx & Jani.
We don't deref the userpointer, we just take the address of one of its
fields. Imo this is just sparse being dense, since all other address
arithmetic is fine with sparse. Is there some way to shut up sparse
here without making the code loook horrible?
-Daniel
On Fri, May 23, 2014 at 2:25 PM, kbuild test robot
<fengguang.wu at intel.com> wrote:
> tree: git://anongit.freedesktop.org/drm-intel for-linux-next-fixes
> head: c1240bd2842f6ec26d7dc1d9c845a197a41d33fe
> commit: 03055f30e32f28dfb24bfa5d3beb75eb7ce7f0d7 [3/4] drm/i915: Only copy back the modified fields to userspace from execbuffer
> reproduce: make C=1 CF=-D__CHECK_ENDIAN__
>
>
> sparse warnings: (new ones prefixed by >>)
>
>>> drivers/gpu/drm/i915/i915_gem_execbuffer.c:1419:47: sparse: incorrect type in initializer (different address spaces)
> drivers/gpu/drm/i915/i915_gem_execbuffer.c:1419:47: expected struct drm_i915_gem_exec_object2 *user_exec_list
> drivers/gpu/drm/i915/i915_gem_execbuffer.c:1419:47: got void [noderef] <asn:1>*
>>> drivers/gpu/drm/i915/i915_gem_execbuffer.c:1423:61: sparse: incorrect type in argument 1 (different address spaces)
> drivers/gpu/drm/i915/i915_gem_execbuffer.c:1423:61: expected void [noderef] <asn:1>*dst
> drivers/gpu/drm/i915/i915_gem_execbuffer.c:1423:61: got unsigned long long *<noident>
>
> vim +1419 drivers/gpu/drm/i915/i915_gem_execbuffer.c
>
> 1413 }
> 1414
> 1415 ret = i915_gem_do_execbuffer(dev, data, file, args, exec2_list);
> 1416 if (!ret) {
> 1417 /* Copy the new buffer offsets back to the user's exec list. */
> 1418 struct drm_i915_gem_exec_object2 *user_exec_list =
>> 1419 to_user_ptr(args->buffers_ptr);
> 1420 int i;
> 1421
> 1422 for (i = 0; i < args->buffer_count; i++) {
>> 1423 ret = __copy_to_user(&user_exec_list[i].offset,
> 1424 &exec2_list[i].offset,
> 1425 sizeof(user_exec_list[i].offset));
> 1426 if (ret) {
>
> ---
> 0-DAY kernel build testing backend Open Source Technology Center
> http://lists.01.org/mailman/listinfo/kbuild Intel Corporation
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
More information about the Intel-gfx
mailing list