linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Guo Ren <guoren@kernel.org>, Guenter Roeck <linux@roeck-us.net>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	linux-csky@vger.kernel.org,
	linux-arch <linux-arch@vger.kernel.org>,
	Guo Ren <guoren@linux.alibaba.com>,
	Christoph Hellwig <hch@infradead.org>
Subject: Re: [PATCH] csky: uaccess.h: Coding convention with asm generic
Date: Wed, 28 Apr 2021 13:49:46 +0100	[thread overview]
Message-ID: <20210428124946.GA1976154@infradead.org> (raw)
In-Reply-To: <CAK8P3a1DvsXSEDoovLk11hzNHyJi7vqNoToU+n5aFi2viZO_Uw@mail.gmail.com>

On Wed, Apr 28, 2021 at 11:25:29AM +0200, Arnd Bergmann wrote:
> Actually, please don't use the asm-generic __put_user version based
> on copy_to_user, we probably have killed it off long ago.

Yes, they are horrible.  

> We might want to come up with a new version of asm-generic/uaccess.h
> that actually makes it easier to have a sane per-architecture
> implementation of the low-level accessors without set_fs().
> 
> I've added Christoph to Cc here, he probably has some ideas
> on where we should be heading.

I think asm-generic/uaccess.h pretty much only makes sense for
nommu.  For that case we can just kill the __{get,put}_user_fn
indirection.  I actually have work for that in an old branch.

Trying to use any of asm-generic/uaccess.h for MMU based kernel is
just asking for trouble.

> One noteworthy aspect is that almost nothing users the low-level
> __get_user()/__put_user() helpers any more outside of architecture
> specific code, so we may not need to have separate versions
> for much longer.

Al has been trying to kill them off entirely for a while, and I hope
he'll eventually succeed.  That being said the difference should be
that the __ versions just skip the access_ok, so having both is
fairly trivial to implement.

  reply	other threads:[~2021-04-28 12:50 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-21  8:54 [PATCH] csky: uaccess.h: Coding convention with asm generic guoren
2021-04-21 14:48 ` Christoph Hellwig
2021-04-28  3:18 ` Guenter Roeck
2021-04-28  8:29   ` Guo Ren
2021-04-28  9:25     ` Arnd Bergmann
2021-04-28 12:49       ` Christoph Hellwig [this message]
2021-04-28 13:07         ` Guo Ren
2021-04-28 13:48         ` Arnd Bergmann
2021-04-28 13:03       ` Guo Ren

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=20210428124946.GA1976154@infradead.org \
    --to=hch@infradead.org \
    --cc=arnd@arndb.de \
    --cc=guoren@kernel.org \
    --cc=guoren@linux.alibaba.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-csky@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    /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).