[Intel-gfx] [PATCH] drm/i915: Always convert incoming exec offsets to non-canonical

Chris Wilson chris at chris-wilson.co.uk
Wed Feb 8 09:27:53 UTC 2017


On Tue, Feb 07, 2017 at 08:55:59PM +0100, Michał Winiarski wrote:
> We're using non-canonical addresses in drm_mm, and we're making sure that
> userspace is using canonical addressing - both in case of softpin
> (verifying incoming offset) and when relocating (converting to canonical
> when updating offset returned to userspace).
> Unfortunately when considering the need for relocations, we're comparing
> offset from userspace (in canonical form) with drm_mm node (in
> non-canonical form), and as a result, we end up always relocating if our
> offsets are in the "problematic" range.
> Let's always convert the offsets to avoid the performance impact of
> relocations.
> 
> Fixes: a5f0edf63bdf ("drm/i915: Avoid writing relocs with addresses in non-canonical form")
> Cc: Chris Wilson <chris at chris-wilson.co.uk>
> Cc: Michel Thierry <michel.thierry at intel.com>
> Reported-by: Michał Pyrzowski <michal.pyrzowski at intel.com>
> Signed-off-by: Michał Winiarski <michal.winiarski at intel.com>

Pushed, thanks for the path.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the Intel-gfx mailing list