[Intel-gfx] [PATCH] drm/i915: add sanity check for partial view creation

2016-03-19 Thread Matthew Auld
Upon creating a partial view we should check that the offset + size is valid relative to the size of the gem object. v2: (Tvrtko Ursulin) - Don't use pages->nents to determine the page count v3: (Chris Wilson) - Handle potential overflow v4: (Chris Wilson) - Idiomatically handle

Re: [Intel-gfx] [PATCH] drm/i915: add sanity check for partial view creation

2016-03-09 Thread Matthew Auld
> If this concerns you that, please look at the API, and please review the outstanding patches. Could you elaborate on this please? What patches are you referring to? ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org

Re: [Intel-gfx] [PATCH] drm/i915: add sanity check for partial view creation

2016-03-04 Thread Chris Wilson
On Fri, Mar 04, 2016 at 10:11:24AM +, Matthew Auld wrote: > When binding pages for a partial view we should check that the offset + > size is valid relative to the size of the gem object. > > v2: Don't use pages->nents to determine the page count (Tvrtko Ursulin) > v3: Handle potential

[Intel-gfx] [PATCH] drm/i915: add sanity check for partial view creation

2016-03-04 Thread Matthew Auld
When binding pages for a partial view we should check that the offset + size is valid relative to the size of the gem object. v2: Don't use pages->nents to determine the page count (Tvrtko Ursulin) v3: Handle potential overflow (Chris Wilson) Cc: Joonas Lahtinen

Re: [Intel-gfx] [PATCH] drm/i915: add sanity check for partial view creation

2016-03-03 Thread Chris Wilson
On Thu, Mar 03, 2016 at 11:27:47AM +, Auld, Matthew wrote: > > Handle overflow? > > Okay, good idea. > > > Why do it here and not at creation? > > We could, given that we currently only exercise partial views in the gem > fault handler code, but as Joonas mentioned we are expecting further

Re: [Intel-gfx] [PATCH] drm/i915: add sanity check for partial view creation

2016-03-03 Thread Auld, Matthew
an internal programming bug. From: Chris Wilson [ch...@chris-wilson.co.uk] Sent: 02 March 2016 14:42 To: Auld, Matthew Cc: intel-gfx@lists.freedesktop.org Subject: Re: [Intel-gfx] [PATCH] drm/i915: add sanity check for partial view creation On Wed, Mar 02, 2

Re: [Intel-gfx] [PATCH] drm/i915: add sanity check for partial view creation

2016-03-02 Thread Chris Wilson
On Wed, Mar 02, 2016 at 02:33:29PM +, Matthew Auld wrote: > When binding pages for a partial view we should check that the offset + > size is valid relative to the size of the gem object. > > v2: Don't use pages->nents to determine the page count (Tvrtko Ursulin) > > Cc: Joonas Lahtinen

[Intel-gfx] [PATCH] drm/i915: add sanity check for partial view creation

2016-03-02 Thread Matthew Auld
When binding pages for a partial view we should check that the offset + size is valid relative to the size of the gem object. v2: Don't use pages->nents to determine the page count (Tvrtko Ursulin) Cc: Joonas Lahtinen Signed-off-by: Matthew Auld

Re: [Intel-gfx] [PATCH] drm/i915: add sanity check for partial view creation

2016-03-02 Thread Joonas Lahtinen
On ma, 2016-02-29 at 19:57 +0200, Ville Syrjälä wrote: > On Mon, Feb 29, 2016 at 05:11:02PM +, Matthew Auld wrote: > > > > When binding pages for a partial view we should check that the offset + > > size is valid relative to the size of the gem object. > > > > Cc: Joonas Lahtinen

Re: [Intel-gfx] [PATCH] drm/i915: add sanity check for partial view creation

2016-03-02 Thread Chris Wilson
On Wed, Mar 02, 2016 at 03:29:12PM +0200, Joonas Lahtinen wrote: > On ma, 2016-02-29 at 17:11 +, Matthew Auld wrote: > > When binding pages for a partial view we should check that the offset + > > size is valid relative to the size of the gem object. > > > > Cc: Joonas Lahtinen

Re: [Intel-gfx] [PATCH] drm/i915: add sanity check for partial view creation

2016-03-02 Thread Tvrtko Ursulin
On 29/02/16 17:11, Matthew Auld wrote: When binding pages for a partial view we should check that the offset + size is valid relative to the size of the gem object. Cc: Joonas Lahtinen Signed-off-by: Matthew Auld ---

Re: [Intel-gfx] [PATCH] drm/i915: add sanity check for partial view creation

2016-03-02 Thread Joonas Lahtinen
On ma, 2016-02-29 at 17:11 +, Matthew Auld wrote: > When binding pages for a partial view we should check that the offset + > size is valid relative to the size of the gem object. > > Cc: Joonas Lahtinen Reviewed-by: Joonas Lahtinen

Re: [Intel-gfx] [PATCH] drm/i915: add sanity check for partial view creation

2016-02-29 Thread Ville Syrjälä
On Mon, Feb 29, 2016 at 05:11:02PM +, Matthew Auld wrote: > When binding pages for a partial view we should check that the offset + > size is valid relative to the size of the gem object. > > Cc: Joonas Lahtinen > Signed-off-by: Matthew Auld

[Intel-gfx] [PATCH] drm/i915: add sanity check for partial view creation

2016-02-29 Thread Matthew Auld
When binding pages for a partial view we should check that the offset + size is valid relative to the size of the gem object. Cc: Joonas Lahtinen Signed-off-by: Matthew Auld --- drivers/gpu/drm/i915/i915_gem_gtt.c | 4 1 file