Re: [Intel-gfx] [PATCH v3 1/8] drm/i915: Make sure fb gtt offsets stay within 32bits

2018-09-27 Thread Ville Syrjälä
On Wed, Sep 26, 2018 at 09:09:31PM +0100, Chris Wilson wrote: > Quoting Ville Syrjälä (2018-09-26 10:27:40) > > On Tue, Sep 25, 2018 at 09:29:44PM +0100, Chris Wilson wrote: > > > Quoting Ville Syrjala (2018-09-25 20:37:07) > > > > From: Ville Syrjälä > > > > + /* Catch potential overflows e

Re: [Intel-gfx] [PATCH v3 1/8] drm/i915: Make sure fb gtt offsets stay within 32bits

2018-09-26 Thread Chris Wilson
Quoting Ville Syrjälä (2018-09-26 10:27:40) > On Tue, Sep 25, 2018 at 09:29:44PM +0100, Chris Wilson wrote: > > Quoting Ville Syrjala (2018-09-25 20:37:07) > > > From: Ville Syrjälä > > > + /* Catch potential overflows early */ > > > + if (add_overflows(mul_u32_u32(height, fb->pitches[

Re: [Intel-gfx] [PATCH v3 1/8] drm/i915: Make sure fb gtt offsets stay within 32bits

2018-09-26 Thread Ville Syrjälä
On Tue, Sep 25, 2018 at 09:29:44PM +0100, Chris Wilson wrote: > Quoting Ville Syrjala (2018-09-25 20:37:07) > > From: Ville Syrjälä > > > > Let's try to make sure the fb offset computations never hit > > an integer overflow by making sure the entire fb stays > > below 32bits. framebuffer_check()

Re: [Intel-gfx] [PATCH v3 1/8] drm/i915: Make sure fb gtt offsets stay within 32bits

2018-09-25 Thread Chris Wilson
Quoting Ville Syrjala (2018-09-25 20:37:07) > From: Ville Syrjälä > > Let's try to make sure the fb offset computations never hit > an integer overflow by making sure the entire fb stays > below 32bits. framebuffer_check() in the core already does > the same check, but as it doesn't know about ti

[Intel-gfx] [PATCH v3 1/8] drm/i915: Make sure fb gtt offsets stay within 32bits

2018-09-25 Thread Ville Syrjala
From: Ville Syrjälä Let's try to make sure the fb offset computations never hit an integer overflow by making sure the entire fb stays below 32bits. framebuffer_check() in the core already does the same check, but as it doesn't know about tiling some things can slip through. Repeat the check in t