From: Guo Ren <guoren@kernel.org>
To: Christoph Hellwig <hch@infradead.org>
Cc: Arnd Bergmann <arnd@arndb.de>, 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>
Subject: Re: [PATCH] csky: uaccess.h: Coding convention with asm generic
Date: Wed, 28 Apr 2021 21:07:09 +0800 [thread overview]
Message-ID: <CAJF2gTTQysMLESzoGsUgGy=sgFkkocmCiv-vAV9a6U2m6bRC2g@mail.gmail.com> (raw)
In-Reply-To: <20210428124946.GA1976154@infradead.org>
On Wed, Apr 28, 2021 at 8:50 PM Christoph Hellwig <hch@infradead.org> wrote:
>
> 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.
I still think the arch should base on asm-generic/uaccess.h, not abandon it.
Thx for reviewing.
>
> > 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.
--
Best Regards
Guo Ren
ML: https://lore.kernel.org/linux-csky/
next prev parent reply other threads:[~2021-04-28 13:07 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
2021-04-28 13:07 ` Guo Ren [this message]
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='CAJF2gTTQysMLESzoGsUgGy=sgFkkocmCiv-vAV9a6U2m6bRC2g@mail.gmail.com' \
--to=guoren@kernel.org \
--cc=arnd@arndb.de \
--cc=guoren@linux.alibaba.com \
--cc=hch@infradead.org \
--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).