Re: [PATCH] drm/i915/query: nospec expects no more than an unsigned long

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

 



Quoting Lionel Landwerlin (2018-05-22 13:22:32)
> On 22/05/18 13:10, Chris Wilson wrote:
> > nospec quite reasonably asserts that it will never be used with an index
> > larger than unsigned long (that being the largest possibly index into an
> > C array). However, our ubi uses the convention of u64 for any large
> > integer, running afoul of the assertion on 32b. Reduce our index to an
> > unsigned long, checking for type overflow first.
> >
> >    drivers/gpu/drm/i915/i915_query.c: In function 'i915_query_ioctl':
> >    include/linux/compiler.h:339:38: error: call to '__compiletime_assert_119' declared with attribute error: BUILD_BUG_ON failed: sizeof(_s) > sizeof(long)
> >
> > Reported-by: kbuild-all@xxxxxx
> > Fixes: 84b510e22da7 ("drm/i915/query: Protect tainted function pointer lookup")
> > Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
> > Cc: Lionel Landwerlin <lionel.g.landwerlin@xxxxxxxxx>
> > Cc: Joonas Lahtinen <joonas.lahtinen@xxxxxxxxxxxxxxx>
> > Cc: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx>
> 
> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@xxxxxxxxx>

And pushed. Thanks for the review, and sorry for the palaver.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://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