Re: [Intel-gfx] [PATCH] drm/i915: fix out-of-bounds page_table access

2016-06-24 Thread Dave Gordon
On 24/06/16 17:37, Chris Wilson wrote: On Fri, Jun 24, 2016 at 05:04:46PM +0100, Matthew Auld wrote: The gen6_for_all_pdes macro does the upper-bound evaluation after accessing the page_table array, hence on the final iteration we end up hitting an out-of-bounds error: [ 1023.831657] UBSAN:

Re: [Intel-gfx] [PATCH] drm/i915: fix out-of-bounds page_table access

2016-06-24 Thread Chris Wilson
On Fri, Jun 24, 2016 at 05:04:46PM +0100, Matthew Auld wrote: > The gen6_for_all_pdes macro does the upper-bound evaluation after > accessing the page_table array, hence on the final iteration we end up > hitting an out-of-bounds error: > > [ 1023.831657] UBSAN: Undefined behaviour in >

[Intel-gfx] [PATCH] drm/i915: fix out-of-bounds page_table access

2016-06-24 Thread Matthew Auld
The gen6_for_all_pdes macro does the upper-bound evaluation after accessing the page_table array, hence on the final iteration we end up hitting an out-of-bounds error: [ 1023.831657] UBSAN: Undefined behaviour in drivers/gpu/drm/i915/i915_gem_gtt.c:1993:2 [ 1023.831680] index 512 is out of