[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK8P3a1XkWNQcFEhJQ0+qWzih1YRQDS_N8xiosN7FHn3yoTJpQ@mail.gmail.com>
Date: Tue, 15 Feb 2022 10:18:15 +0100
From: Arnd Bergmann <arnd@...nel.org>
To: Christoph Hellwig <hch@...radead.org>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>,
Christoph Hellwig <hch@....de>,
linux-arch <linux-arch@...r.kernel.org>,
Linux-MM <linux-mm@...ck.org>,
Linux API <linux-api@...r.kernel.org>,
Arnd Bergmann <arnd@...db.de>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Mark Rutland <mark.rutland@....com>,
Rich Felker <dalias@...c.org>, linux-ia64@...r.kernel.org,
Linux-sh list <linux-sh@...r.kernel.org>,
Peter Zijlstra <peterz@...radead.org>,
Max Filippov <jcmvbkbc@...il.com>, Guo Ren <guoren@...nel.org>,
sparclinux <sparclinux@...r.kernel.org>,
"open list:QUALCOMM HEXAGON..." <linux-hexagon@...r.kernel.org>,
linux-riscv <linux-riscv@...ts.infradead.org>,
Will Deacon <will@...nel.org>,
Ard Biesheuvel <ardb@...nel.org>,
linux-s390 <linux-s390@...r.kernel.org>,
Brian Cain <bcain@...eaurora.org>,
Helge Deller <deller@....de>,
"the arch/x86 maintainers" <x86@...nel.org>,
Russell King - ARM Linux <linux@...linux.org.uk>,
linux-csky@...r.kernel.org, Ingo Molnar <mingo@...hat.com>,
Geert Uytterhoeven <geert@...ux-m68k.org>,
"open list:SYNOPSYS ARC ARCHITECTURE"
<linux-snps-arc@...ts.infradead.org>,
"open list:TENSILICA XTENSA PORT (xtensa)"
<linux-xtensa@...ux-xtensa.org>,
Heiko Carstens <hca@...ux.ibm.com>,
alpha <linux-alpha@...r.kernel.org>,
linux-um <linux-um@...ts.infradead.org>,
linux-m68k <linux-m68k@...ts.linux-m68k.org>,
Openrisc <openrisc@...ts.librecores.org>,
Greentime Hu <green.hu@...il.com>,
Stafford Horne <shorne@...il.com>,
Linux ARM <linux-arm-kernel@...ts.infradead.org>,
Michal Simek <monstr@...str.eu>,
Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
Parisc List <linux-parisc@...r.kernel.org>,
Nick Hu <nickhu@...estech.com>,
"open list:BROADCOM NVRAM DRIVER" <linux-mips@...r.kernel.org>,
"# 3.4.x" <stable@...r.kernel.org>,
Dinh Nguyen <dinguyen@...nel.org>,
"Eric W . Biederman" <ebiederm@...ssion.com>,
Richard Weinberger <richard@....at>,
Andrew Morton <akpm@...ux-foundation.org>,
linuxppc-dev <linuxppc-dev@...ts.ozlabs.org>,
David Miller <davem@...emloft.net>
Subject: Re: [PATCH 03/14] nds32: fix access_ok() checks in get/put_user
On Mon, Feb 14, 2022 at 6:01 PM Christoph Hellwig <hch@...radead.org> wrote:
>
> On Mon, Feb 14, 2022 at 05:34:41PM +0100, Arnd Bergmann wrote:
> > From: Arnd Bergmann <arnd@...db.de>
> >
> > The get_user()/put_user() functions are meant to check for
> > access_ok(), while the __get_user()/__put_user() functions
> > don't.
> >
> > This broke in 4.19 for nds32, when it gained an extraneous
> > check in __get_user(), but lost the check it needs in
> > __put_user().
>
> Can we follow the lead of MIPS (which this was originally copied
> from I think) and kill the pointless __get/put_user_check wrapper
> that just obsfucate the code?
I had another look, but I think that would be a bigger change than
I want to have in a fix for stable backports, as nds32 also uses
the _check versions in __{get,put}_user_error.
If we instead clean it up in a separate patch, it should be done for
all eight architectures that do the same thing, but at that point,
the time seems better spent at coming up with a new set of
calling conventions that work with asm-goto.
Arnd
Powered by blists - more mailing lists