[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <a185caf56e8549a0bd61311eba709fd4@AcuMS.aculab.com>
Date: Mon, 11 Dec 2017 09:41:35 +0000
From: David Laight <David.Laight@...LAB.COM>
To: 'Kees Cook' <keescook@...omium.org>
CC: Jason Ekstrand <jason@...kstrand.net>,
Chris Wilson <chris@...is-wilson.co.uk>,
"intel-gfx@...ts.freedesktop.org" <intel-gfx@...ts.freedesktop.org>,
"dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH] drm/i915: Use copy_from_user() in fence copying
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
Powered by blists - more mailing lists