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

David Laight David.Laight at ACULAB.COM
Mon Dec 11 09:41:35 UTC 2017


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



More information about the dri-devel mailing list