Re: [PATCH 03/14] nds32: fix access_ok() checks in get/put_user
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: Arnd Bergmann <arnd@xxxxxxxxxx>
- Subject: Re: [PATCH 03/14] nds32: fix access_ok() checks in get/put_user
- From: Greg KH <gregkh@xxxxxxxxxxxxxxxxxxx>
- Date: Tue, 15 Feb 2022 11:25:44 +0100
- Cc: Christoph Hellwig <hch@xxxxxxxxxxxxx>, Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>, Christoph Hellwig <hch@xxxxxx>, linux-arch <linux-arch@xxxxxxxxxxxxxxx>, Linux-MM <linux-mm@xxxxxxxxx>, Linux API <linux-api@xxxxxxxxxxxxxxx>, Arnd Bergmann <arnd@xxxxxxxx>, Linux Kernel Mailing List <linux-kernel@xxxxxxxxxxxxxxx>, Mark Rutland <mark.rutland@xxxxxxx>, Rich Felker <dalias@xxxxxxxx>, linux-ia64@xxxxxxxxxxxxxxx, Linux-sh list <linux-sh@xxxxxxxxxxxxxxx>, Peter Zijlstra <peterz@xxxxxxxxxxxxx>, Max Filippov <jcmvbkbc@xxxxxxxxx>, Guo Ren <guoren@xxxxxxxxxx>, sparclinux <sparclinux@xxxxxxxxxxxxxxx>, "open list:QUALCOMM HEXAGON..." <linux-hexagon@xxxxxxxxxxxxxxx>, linux-riscv <linux-riscv@xxxxxxxxxxxxxxxxxxx>, Will Deacon <will@xxxxxxxxxx>, Ard Biesheuvel <ardb@xxxxxxxxxx>, linux-s390 <linux-s390@xxxxxxxxxxxxxxx>, Brian Cain <bcain@xxxxxxxxxxxxxx>, Helge Deller <deller@xxxxxx>, the arch/x86 maintainers <x86@xxxxxxxxxx>, Russell King - ARM Linux <linux@xxxxxxxxxxxxxxx>, linux-csky@xxxxxxxxxxxxxxx, Ingo Molnar <mingo@xxxxxxxxxx>, Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>, "open list:SYNOPSYS ARC ARCHITECTURE" <linux-snps-arc@xxxxxxxxxxxxxxxxxxx>, "open list:TENSILICA XTENSA PORT (xtensa)" <linux-xtensa@xxxxxxxxxxxxxxxx>, Heiko Carstens <hca@xxxxxxxxxxxxx>, alpha <linux-alpha@xxxxxxxxxxxxxxx>, linux-um <linux-um@xxxxxxxxxxxxxxxxxxx>, linux-m68k <linux-m68k@xxxxxxxxxxxxxxx>, Openrisc <openrisc@xxxxxxxxxxxxxxxxxxxx>, Greentime Hu <green.hu@xxxxxxxxx>, Stafford Horne <shorne@xxxxxxxxx>, Linux ARM <linux-arm-kernel@xxxxxxxxxxxxxxxxxxx>, Michal Simek <monstr@xxxxxxxxx>, Thomas Bogendoerfer <tsbogend@xxxxxxxxxxxxxxxx>, Parisc List <linux-parisc@xxxxxxxxxxxxxxx>, Nick Hu <nickhu@xxxxxxxxxxxxx>, "open list:BROADCOM NVRAM DRIVER" <linux-mips@xxxxxxxxxxxxxxx>, "# 3.4.x" <stable@xxxxxxxxxxxxxxx>, Dinh Nguyen <dinguyen@xxxxxxxxxx>, "Eric W . Biederman" <ebiederm@xxxxxxxxxxxx>, Richard Weinberger <richard@xxxxxx>, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, linuxppc-dev <linuxppc-dev@xxxxxxxxxxxxxxxx>, David Miller <davem@xxxxxxxxxxxxx>
- In-reply-to: <CAK8P3a1XkWNQcFEhJQ0+qWzih1YRQDS_N8xiosN7FHn3yoTJpQ@mail.gmail.com>
- References: <20220214163452.1568807-1-arnd@kernel.org> <20220214163452.1568807-4-arnd@kernel.org> <YgqK1ihlJvRFHJ9h@infradead.org> <CAK8P3a1XkWNQcFEhJQ0+qWzih1YRQDS_N8xiosN7FHn3yoTJpQ@mail.gmail.com>
On Tue, Feb 15, 2022 at 10:18:15AM +0100, Arnd Bergmann wrote:
> On Mon, Feb 14, 2022 at 6:01 PM Christoph Hellwig <hch@xxxxxxxxxxxxx> wrote:
> >
> > On Mon, Feb 14, 2022 at 05:34:41PM +0100, Arnd Bergmann wrote:
> > > From: Arnd Bergmann <arnd@xxxxxxxx>
> > >
> > > 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.
Don't worry about stable backports first, get it correct and merged and
then worry about them if you really have to.
If someone cares about nds32 for stable kernels, they can do the
backport work :)
thanks,
greg k-h
[Index of Archives]
[Linux Kernel]
[Sparc Linux]
[DCCP]
[Linux ARM]
[Yosemite News]
[Linux SCSI]
[Linux x86_64]
[Linux for Ham Radio]