Re: [Intel-gfx] [PATCH] drm/i915: Minimize uaccess exposure in i915_gem_execbuffer2_ioctl()

2020-02-28 Thread Al Viro
On Fri, Feb 28, 2020 at 07:04:41PM +0100, Peter Zijlstra wrote: > On Thu, Feb 27, 2020 at 07:03:42PM -0600, Josh Poimboeuf wrote: > > > And why not mark gen8_canonical_addr() __always_inline? > > > > Right, marking those two functions as __always_inline is the other > > option. The problem is,

Re: [Intel-gfx] [PATCH] drm/i915: Minimize uaccess exposure in i915_gem_execbuffer2_ioctl()

2020-02-28 Thread Peter Zijlstra
On Thu, Feb 27, 2020 at 07:03:42PM -0600, Josh Poimboeuf wrote: > > And why not mark gen8_canonical_addr() __always_inline? > > Right, marking those two functions as __always_inline is the other > option. The problem is, if you keep doing it, eventually you end up > with __always_inline-itis

Re: [Intel-gfx] [PATCH] drm/i915: Minimize uaccess exposure in i915_gem_execbuffer2_ioctl()

2020-02-28 Thread Josh Poimboeuf
On Thu, Feb 27, 2020 at 10:26:00PM +, Chris Wilson wrote: > > --- a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c > > +++ b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c > > @@ -2947,6 +2947,13 @@ i915_gem_execbuffer2_ioctl(struct drm_device *dev, > > void *data, > >

Re: [Intel-gfx] [PATCH] drm/i915: Minimize uaccess exposure in i915_gem_execbuffer2_ioctl()

2020-02-27 Thread Randy Dunlap
On 2/27/20 5:03 PM, Josh Poimboeuf wrote: > On Thu, Feb 27, 2020 at 10:35:42PM +, Al Viro wrote: >> On Thu, Feb 27, 2020 at 04:08:26PM -0600, Josh Poimboeuf wrote: >>> With CONFIG_CC_OPTIMIZE_FOR_SIZE, objtool reports: >>> >>> drivers/gpu/drm/i915/gem/i915_gem_execbuffer.o: warning: objtool:

Re: [Intel-gfx] [PATCH] drm/i915: Minimize uaccess exposure in i915_gem_execbuffer2_ioctl()

2020-02-27 Thread Josh Poimboeuf
On Thu, Feb 27, 2020 at 10:35:42PM +, Al Viro wrote: > On Thu, Feb 27, 2020 at 04:08:26PM -0600, Josh Poimboeuf wrote: > > With CONFIG_CC_OPTIMIZE_FOR_SIZE, objtool reports: > > > > drivers/gpu/drm/i915/gem/i915_gem_execbuffer.o: warning: objtool: > > i915_gem_execbuffer2_ioctl()+0x5b7:

Re: [Intel-gfx] [PATCH] drm/i915: Minimize uaccess exposure in i915_gem_execbuffer2_ioctl()

2020-02-27 Thread Al Viro
On Thu, Feb 27, 2020 at 04:08:26PM -0600, Josh Poimboeuf wrote: > With CONFIG_CC_OPTIMIZE_FOR_SIZE, objtool reports: > > drivers/gpu/drm/i915/gem/i915_gem_execbuffer.o: warning: objtool: > i915_gem_execbuffer2_ioctl()+0x5b7: call to gen8_canonical_addr() with > UACCESS enabled > > This means

Re: [Intel-gfx] [PATCH] drm/i915: Minimize uaccess exposure in i915_gem_execbuffer2_ioctl()

2020-02-27 Thread Chris Wilson
Quoting Josh Poimboeuf (2020-02-27 22:08:26) > With CONFIG_CC_OPTIMIZE_FOR_SIZE, objtool reports: > > drivers/gpu/drm/i915/gem/i915_gem_execbuffer.o: warning: objtool: > i915_gem_execbuffer2_ioctl()+0x5b7: call to gen8_canonical_addr() with > UACCESS enabled > > This means

[Intel-gfx] [PATCH] drm/i915: Minimize uaccess exposure in i915_gem_execbuffer2_ioctl()

2020-02-27 Thread Josh Poimboeuf
With CONFIG_CC_OPTIMIZE_FOR_SIZE, objtool reports: drivers/gpu/drm/i915/gem/i915_gem_execbuffer.o: warning: objtool: i915_gem_execbuffer2_ioctl()+0x5b7: call to gen8_canonical_addr() with UACCESS enabled This means i915_gem_execbuffer2_ioctl() is calling gen8_canonical_addr() -- and