lkml.org 
[lkml]   [2020]   [Feb]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH] drm/i915: Minimize uaccess exposure in i915_gem_execbuffer2_ioctl()
On Thu, Feb 27, 2020 at 10:26:00PM +0000, 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,
> > u64_to_user_ptr(args->buffers_ptr);
> > unsigned int i;
> >
> > + /*
> > + * Do the call to gen8_canonical_addr() outside the
> > + * uaccess-enabled region to minimize uaccess exposure.
> > + */
> > + for (i = 0; i < args->buffer_count; i++)
> > + exec2_list[i].offset = gen8_canonical_addr(exec2_list[i].offset);
>
>
> Another loop over all the objects, where we intentionally try and skip
> unmodified entries? To save 2 instructions from inside the second loop?
>
> Colour me skeptical.

So are you're saying these arrays can be large and that you have
performance concerns?

--
Josh

\
 
 \ /
  Last update: 2020-02-28 17:11    [W:0.067 / U:0.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site