[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220214200011.GA3786@lst.de>
Date: Mon, 14 Feb 2022 21:00:11 +0100
From: Christoph Hellwig <hch@....de>
To: Arnd Bergmann <arnd@...nel.org>
Cc: Christoph Hellwig <hch@...radead.org>,
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>,
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>,
Al Viro <viro@...iv.linux.org.uk>
Subject: Re: [PATCH 04/14] x86: use more conventional access_ok() definition
On Mon, Feb 14, 2022 at 08:45:52PM +0100, Arnd Bergmann wrote:
> As Al pointed out, they turned out to be necessary on sparc64, but the only
> definitions are on sparc64 and x86, so it's possible that they serve a similar
> purpose here, in which case changing the limit from TASK_SIZE to
> TASK_SIZE_MAX is probably wrong as well.
>
> So either I need to revert the original definition as I did on sparc64, or
> they can be removed completely. Hopefully Al or the x86 maintainers
> can clarify.
Looking at the x86 users I think:
- valid_user_frame should go away and the caller should use get_user
instead of __get_user
- the one in copy_code can just go away, as there is another check
in copy_from_user_nmi
- copy_stack_frame should just use access_ok
- as does copy_from_user_nmi
but yes, having someone who actually knows this code look over it
would be very helpful.
Powered by blists - more mailing lists