From: David Laight <David.Laight@ACULAB.COM>
To: "'Kees Cook'" <keescook@chromium.org>
Cc: Jason Ekstrand <jason@jlekstrand.net>,
Chris Wilson <chris@chris-wilson.co.uk>,
"intel-gfx@lists.freedesktop.org"
<intel-gfx@lists.freedesktop.org>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH] drm/i915: Use copy_from_user() in fence copying
Date: Mon, 11 Dec 2017 09:41:35 +0000 [thread overview]
Message-ID: <a185caf56e8549a0bd61311eba709fd4@AcuMS.aculab.com> (raw)
In-Reply-To: <CAGXu5jLQnNg0m35467g6BW5Zdv3bm9bzzJzJyF8+4bbHF_SeVA@mail.gmail.com>
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
next prev parent reply other threads:[~2017-12-11 9:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-06 20:28 [PATCH] drm/i915: Use copy_from_user() in fence copying Kees Cook
2017-12-08 10:17 ` David Laight
2017-12-08 21:10 ` Kees Cook
2017-12-11 9:41 ` David Laight [this message]
2017-12-11 9:34 ` [Intel-gfx] " Joonas Lahtinen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a185caf56e8549a0bd61311eba709fd4@AcuMS.aculab.com \
--to=david.laight@aculab.com \
--cc=chris@chris-wilson.co.uk \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jason@jlekstrand.net \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).