[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8a6e309687d647e3aef8a88bdb0922af@AcuMS.aculab.com>
Date: Mon, 14 Feb 2022 17:10:05 +0000
From: David Laight <David.Laight@...LAB.COM>
To: 'Christoph Hellwig' <hch@...radead.org>,
Arnd Bergmann <arnd@...nel.org>
CC: Linus Torvalds <torvalds@...ux-foundation.org>,
Christoph Hellwig <hch@....de>,
"linux-arch@...r.kernel.org" <linux-arch@...r.kernel.org>,
"linux-mm@...ck.org" <linux-mm@...ck.org>,
"linux-api@...r.kernel.org" <linux-api@...r.kernel.org>,
"arnd@...db.de" <arnd@...db.de>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"mark.rutland@....com" <mark.rutland@....com>,
"dalias@...c.org" <dalias@...c.org>,
"linux-ia64@...r.kernel.org" <linux-ia64@...r.kernel.org>,
"linux-sh@...r.kernel.org" <linux-sh@...r.kernel.org>,
"peterz@...radead.org" <peterz@...radead.org>,
"jcmvbkbc@...il.com" <jcmvbkbc@...il.com>,
"guoren@...nel.org" <guoren@...nel.org>,
"sparclinux@...r.kernel.org" <sparclinux@...r.kernel.org>,
"linux-hexagon@...r.kernel.org" <linux-hexagon@...r.kernel.org>,
"linux-riscv@...ts.infradead.org" <linux-riscv@...ts.infradead.org>,
"will@...nel.org" <will@...nel.org>,
"ardb@...nel.org" <ardb@...nel.org>,
"linux-s390@...r.kernel.org" <linux-s390@...r.kernel.org>,
"bcain@...eaurora.org" <bcain@...eaurora.org>,
"deller@....de" <deller@....de>, "x86@...nel.org" <x86@...nel.org>,
"linux@...linux.org.uk" <linux@...linux.org.uk>,
"linux-csky@...r.kernel.org" <linux-csky@...r.kernel.org>,
"mingo@...hat.com" <mingo@...hat.com>,
"geert@...ux-m68k.org" <geert@...ux-m68k.org>,
"linux-snps-arc@...ts.infradead.org"
<linux-snps-arc@...ts.infradead.org>,
"linux-xtensa@...ux-xtensa.org" <linux-xtensa@...ux-xtensa.org>,
"hca@...ux.ibm.com" <hca@...ux.ibm.com>,
"linux-alpha@...r.kernel.org" <linux-alpha@...r.kernel.org>,
"linux-um@...ts.infradead.org" <linux-um@...ts.infradead.org>,
"linux-m68k@...ts.linux-m68k.org" <linux-m68k@...ts.linux-m68k.org>,
"openrisc@...ts.librecores.org" <openrisc@...ts.librecores.org>,
"green.hu@...il.com" <green.hu@...il.com>,
"shorne@...il.com" <shorne@...il.com>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
"monstr@...str.eu" <monstr@...str.eu>,
"tsbogend@...ha.franken.de" <tsbogend@...ha.franken.de>,
"linux-parisc@...r.kernel.org" <linux-parisc@...r.kernel.org>,
"nickhu@...estech.com" <nickhu@...estech.com>,
"linux-mips@...r.kernel.org" <linux-mips@...r.kernel.org>,
"stable@...r.kernel.org" <stable@...r.kernel.org>,
"dinguyen@...nel.org" <dinguyen@...nel.org>,
"ebiederm@...ssion.com" <ebiederm@...ssion.com>,
"richard@....at" <richard@....at>,
"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
"linuxppc-dev@...ts.ozlabs.org" <linuxppc-dev@...ts.ozlabs.org>,
"davem@...emloft.net" <davem@...emloft.net>
Subject: RE: [PATCH 03/14] nds32: fix access_ok() checks in get/put_user
From: Christoph Hellwig
> Sent: 14 February 2022 17:01
>
> 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?
Is it possible to make all these architectures fall back to
a common definition somewhere?
Maybe they need to define ACCESS_OK_USER_LIMIT - which can be
different from TASK_SIZE.
There'll be a few special cases, but most architectures have
kernel addresses above userspace ones.
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
Powered by blists - more mailing lists