lkml.org 
[lkml]   [2021]   [Apr]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] csky: uaccess.h: Coding convention with asm generic
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/

\
 
 \ /
  Last update: 2021-04-28 15:08    [W:0.075 / U:0.372 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site