Re: [PATCH 04/14] x86: use more conventional access_ok() definition
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: Arnd Bergmann <arnd@xxxxxxxxxx>
- Subject: Re: [PATCH 04/14] x86: use more conventional access_ok() definition
- From: Christoph Hellwig <hch@xxxxxx>
- Date: Mon, 14 Feb 2022 21:00:11 +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>, 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>, Al Viro <viro@xxxxxxxxxxxxxxxxxx>
- In-reply-to: <CAK8P3a1F3JaYaJPy9bSCG1+YV6EN05PE0DbwpD_GT1qRwFSJ-w@mail.gmail.com>
- References: <20220214163452.1568807-1-arnd@kernel.org> <20220214163452.1568807-5-arnd@kernel.org> <YgqLFYqIqkIsNC92@infradead.org> <CAK8P3a1F3JaYaJPy9bSCG1+YV6EN05PE0DbwpD_GT1qRwFSJ-w@mail.gmail.com>
- User-agent: Mutt/1.5.17 (2007-11-01)
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.
[Index of Archives]
[Linux Kernel]
[Sparc Linux]
[DCCP]
[Linux ARM]
[Yosemite News]
[Linux SCSI]
[Linux x86_64]
[Linux for Ham Radio]