Re: [Intel-gfx] [PATCH 5/5] drm/i915: Use unsigned for overflow checks in execbuf

2013-09-19 Thread Chris Wilson
On Thu, Sep 19, 2013 at 12:18:36PM +0200, Daniel Vetter wrote: > There's actually no real risk since we already check for stricter > constraints earlier (using UINT_MAX / sizeof (struct > drm_i915_gem_exec_object2) as the limit). But in eb_create we use > signed integers, which steals a factor of 2

Re: [Intel-gfx] [PATCH 5/5] drm/i915: Use unsigned for overflow checks in execbuf

2013-09-19 Thread Jani Nikula
On Thu, 19 Sep 2013, Daniel Vetter wrote: > There's actually no real risk since we already check for stricter > constraints earlier (using UINT_MAX / sizeof (struct > drm_i915_gem_exec_object2) as the limit). But in eb_create we use > signed integers, which steals a factor of 2. Luckily struct > d

[Intel-gfx] [PATCH 5/5] drm/i915: Use unsigned for overflow checks in execbuf

2013-09-19 Thread Daniel Vetter
There's actually no real risk since we already check for stricter constraints earlier (using UINT_MAX / sizeof (struct drm_i915_gem_exec_object2) as the limit). But in eb_create we use signed integers, which steals a factor of 2. Luckily struct drm_i915_gem_exec_object2 for this to not matter. Sti