RE: [PATCH] drm/i915: Use copy_from_user() in fence copying

From: David Laight
Date: Mon Dec 11 2017 - 04:41:25 EST


From: Kees Cook
> Sent: 08 December 2017 21:10
> >> There's no good reason to separate the access_ok() from the copy,
> >> especially since the access_ok() size is hard-coded instead of using
> >> sizeof(). Instead, just use copy_from_user() directly.
> >
> > Looks like an optimisation to save doing the access_ok() check
> > for every 'fence'.
>
> If it really makes a difference, okay, but access_ok() checks are fast. :P

Not compared to get_user() :-)

David