From: Christoph Hellwig <hch@lst.de>
To: Jeremy Kerr <jk@ozlabs.org>
Cc: linuxppc-dev@lists.ozlabs.org, 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 07:39:01 +0200 [thread overview]
Message-ID: <20200430053901.GA6981@lst.de> (raw)
In-Reply-To: <9c629b09cf25d143c7787548516c1f276bd09aa5.camel@ozlabs.org>
On Thu, Apr 30, 2020 at 08:39:00AM +0800, Jeremy Kerr wrote:
> 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?
access_ok is just trivial comparism to the segment limit, I don't
think it has a relavant performance impact.
next prev parent reply other threads:[~2020-04-30 5:41 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
2020-04-30 5:39 ` Christoph Hellwig [this message]
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=20200430053901.GA6981@lst.de \
--to=hch@lst.de \
--cc=arnd@arndb.de \
--cc=jk@ozlabs.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.