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

2017-12-11 Thread David Laight
From: Kees Cook > Sent: 06 December 2017 20:29 > > 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

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

2017-12-11 Thread Kees Cook
On Fri, Dec 8, 2017 at 2:17 AM, David Laight wrote: > From: Kees Cook >> Sent: 06 December 2017 20:29 >> >> 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

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

2017-12-11 Thread David Laight
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