linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Jeremy Kerr <jk@ozlabs.org>
To: Christophe Leroy <christophe.leroy@c-s.fr>,
	linuxppc-dev@lists.ozlabs.org
Cc: Christoph Hellwig <hch@lst.de>, Arnd Bergmann <arnd@arndb.de>
Subject: Re: [PATCH 2/2] powerpc/spufs: stop using access_ok
Date: Thu, 30 Apr 2020 08:39:00 +0800	[thread overview]
Message-ID: <9c629b09cf25d143c7787548516c1f276bd09aa5.camel@ozlabs.org> (raw)
In-Reply-To: <ebc47890-649e-71c7-02b1-179db964db37@c-s.fr>

Hi Christophe,

> > Just use the proper non __-prefixed get/put_user variants where
> > that is not done yet.
> 
> But it means you are doing the access_ok() check everytime, which is 
> what is to be avoided by doing the access_ok() once then using the 
> __-prefixed variant.

5 out of 8 of these are just a access_ok(); simple_read_from_buffer().

For the cases where it's multiple __put/get_user()s, the max will be 5.
(for the mbox access). Is that worth optimising the access_ok() checks?

Cheers,


Jeremy


  reply	other threads:[~2020-04-30  0:40 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-29  7:03 [PATCH 1/2] powerpc/spufs: fix copy_to_user while atomic Jeremy Kerr
2020-04-29  7:03 ` [PATCH 2/2] powerpc/spufs: stop using access_ok Jeremy Kerr
2020-04-29 15:00   ` Christophe Leroy
2020-04-30  0:39     ` Jeremy Kerr [this message]
2020-04-30  5:39       ` Christoph Hellwig
2020-04-30  6:18         ` Christophe Leroy
2020-05-04 13:04 ` [PATCH 1/2] powerpc/spufs: fix copy_to_user while atomic Christoph Hellwig
2020-05-05  7:20   ` Michael Ellerman
2020-05-05  7:30     ` Christoph Hellwig

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=9c629b09cf25d143c7787548516c1f276bd09aa5.camel@ozlabs.org \
    --to=jk@ozlabs.org \
    --cc=arnd@arndb.de \
    --cc=christophe.leroy@c-s.fr \
    --cc=hch@lst.de \
    --cc=linuxppc-dev@lists.ozlabs.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).