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

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

2017-12-11 Thread Joonas Lahtinen
On Wed, 2017-12-06 at 12:28 -0800, Kees Cook wrote: > 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. > > Fixes: cf6e7bac6357 ("drm/i915: Add support

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

2017-12-07 Thread Kees Cook
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. Fixes: cf6e7bac6357 ("drm/i915: Add support for drm syncobjs") Cc: Jason Ekstrand