Re: [RFC PATCH 0/3] arc: remove CONFIG_SET_FS

2022-02-15 Thread Sergey Matyukevich
Hi Vineet, > > Hi all, > > > > This patch series removes SET_FS support for arc. > > > > Sergey Matyukevich (3): > >arc: use BUILD_BUG for invalid sizes in get_user/put_user > >arc: provide __{get,put}_kernel_nofault > >arc: remove set_fs() > > > > arch/arc/Kconfig

RE: [PATCH 09/14] m68k: drop custom __access_ok()

2022-02-15 Thread David Laight
From: Arnd Bergmann > Sent: 15 February 2022 10:02 > > On Tue, Feb 15, 2022 at 8:13 AM Al Viro wrote: > > On Tue, Feb 15, 2022 at 07:29:42AM +0100, Christoph Hellwig wrote: > > > On Tue, Feb 15, 2022 at 12:37:41AM +, Al Viro wrote: > > > > Perhaps simply wrap that sucker into #ifdef > > > >

Re: [PATCH 05/14] uaccess: add generic __{get,put}_kernel_nofault

2022-02-15 Thread Arnd Bergmann
On Tue, Feb 15, 2022 at 1:31 AM Al Viro wrote: > > On Mon, Feb 14, 2022 at 05:34:43PM +0100, Arnd Bergmann wrote: > > From: Arnd Bergmann > > > > All architectures that don't provide __{get,put}_kernel_nofault() yet > > can implement this on top of __{get,put}_user. > > > > Add a generic version

Re: [PATCH 08/14] arm64: simplify access_ok()

2022-02-15 Thread Mark Rutland
On Tue, Feb 15, 2022 at 09:30:41AM +, David Laight wrote: > From: Ard Biesheuvel > > Sent: 15 February 2022 08:18 > > > > On Mon, 14 Feb 2022 at 17:37, Arnd Bergmann wrote: > > > > > > From: Arnd Bergmann > > > > > > arm64 has an inline asm implementation of access_ok() that is derived from

Re: [PATCH 08/14] arm64: simplify access_ok()

2022-02-15 Thread Mark Rutland
On Mon, Feb 14, 2022 at 05:34:46PM +0100, Arnd Bergmann wrote: > From: Arnd Bergmann > > arm64 has an inline asm implementation of access_ok() that is derived from > the 32-bit arm version and optimized for the case that both the limit and > the size are variable. With set_fs() gone, the limit is

Re: [PATCH 07/14] uaccess: generalize access_ok()

2022-02-15 Thread Mark Rutland
On Mon, Feb 14, 2022 at 05:34:45PM +0100, Arnd Bergmann wrote: > From: Arnd Bergmann > > There are many different ways that access_ok() is defined across > architectures, but in the end, they all just compare against the > user_addr_max() value or they accept anything. > > Provide one definition

Re: [PATCH 08/14] arm64: simplify access_ok()

2022-02-15 Thread Mark Rutland
On Tue, Feb 15, 2022 at 10:39:46AM +0100, Arnd Bergmann wrote: > On Tue, Feb 15, 2022 at 10:21 AM Ard Biesheuvel wrote: > > On Tue, 15 Feb 2022 at 10:13, Arnd Bergmann wrote: > > > > arm64 also has this leading up to the range check, and I think we'd no > > longer need it: > > > > if (IS_ENAB

Re: [PATCH 08/14] arm64: simplify access_ok()

2022-02-15 Thread Mark Rutland
On Tue, Feb 15, 2022 at 10:21:16AM +0100, Ard Biesheuvel wrote: > On Tue, 15 Feb 2022 at 10:13, Arnd Bergmann wrote: > > > > On Tue, Feb 15, 2022 at 9:17 AM Ard Biesheuvel wrote: > > > On Mon, 14 Feb 2022 at 17:37, Arnd Bergmann wrote: > > > > From: Arnd Bergmann > > > > > > > > > > With set_fs

Re: [PATCH 03/14] nds32: fix access_ok() checks in get/put_user

2022-02-15 Thread Greg KH
On Tue, Feb 15, 2022 at 10:18:15AM +0100, Arnd Bergmann wrote: > On Mon, Feb 14, 2022 at 6:01 PM Christoph Hellwig wrote: > > > > On Mon, Feb 14, 2022 at 05:34:41PM +0100, Arnd Bergmann wrote: > > > From: Arnd Bergmann > > > > > > The get_user()/put_user() functions are meant to check for > > > a

Re: [PATCH 09/14] m68k: drop custom __access_ok()

2022-02-15 Thread Arnd Bergmann
On Tue, Feb 15, 2022 at 8:13 AM Al Viro wrote: > On Tue, Feb 15, 2022 at 07:29:42AM +0100, Christoph Hellwig wrote: > > On Tue, Feb 15, 2022 at 12:37:41AM +, Al Viro wrote: > > > Perhaps simply wrap that sucker into #ifdef CONFIG_CPU_HAS_ADDRESS_SPACES > > > (and trim the comment down to "cold

Re: [PATCH 08/14] arm64: simplify access_ok()

2022-02-15 Thread Arnd Bergmann
On Tue, Feb 15, 2022 at 10:21 AM Ard Biesheuvel wrote: > On Tue, 15 Feb 2022 at 10:13, Arnd Bergmann wrote: > > arm64 also has this leading up to the range check, and I think we'd no > longer need it: > > if (IS_ENABLED(CONFIG_ARM64_TAGGED_ADDR_ABI) && > (current->flags & PF_KTHREAD |

RE: [PATCH 08/14] arm64: simplify access_ok()

2022-02-15 Thread David Laight
From: Ard Biesheuvel > Sent: 15 February 2022 08:18 > > On Mon, 14 Feb 2022 at 17:37, Arnd Bergmann wrote: > > > > From: Arnd Bergmann > > > > arm64 has an inline asm implementation of access_ok() that is derived from > > the 32-bit arm version and optimized for the case that both the limit and

Re: [PATCH 08/14] arm64: simplify access_ok()

2022-02-15 Thread Ard Biesheuvel
On Tue, 15 Feb 2022 at 10:13, Arnd Bergmann wrote: > > On Tue, Feb 15, 2022 at 9:17 AM Ard Biesheuvel wrote: > > On Mon, 14 Feb 2022 at 17:37, Arnd Bergmann wrote: > > > From: Arnd Bergmann > > > > > > > With set_fs() out of the picture, wouldn't it be sufficient to check > > that bit #55 is cl

Re: [PATCH 03/14] nds32: fix access_ok() checks in get/put_user

2022-02-15 Thread Arnd Bergmann
On Mon, Feb 14, 2022 at 6:01 PM Christoph Hellwig wrote: > > On Mon, Feb 14, 2022 at 05:34:41PM +0100, Arnd Bergmann wrote: > > From: Arnd Bergmann > > > > The get_user()/put_user() functions are meant to check for > > access_ok(), while the __get_user()/__put_user() functions > > don't. > > > >

Re: [PATCH 08/14] arm64: simplify access_ok()

2022-02-15 Thread Arnd Bergmann
On Tue, Feb 15, 2022 at 9:17 AM Ard Biesheuvel wrote: > On Mon, 14 Feb 2022 at 17:37, Arnd Bergmann wrote: > > From: Arnd Bergmann > > > > With set_fs() out of the picture, wouldn't it be sufficient to check > that bit #55 is clear? (the bit that selects between TTBR0 and TTBR1) > That would als

Re: [PATCH 08/14] arm64: simplify access_ok()

2022-02-15 Thread Ard Biesheuvel
On Mon, 14 Feb 2022 at 17:37, Arnd Bergmann wrote: > > From: Arnd Bergmann > > arm64 has an inline asm implementation of access_ok() that is derived from > the 32-bit arm version and optimized for the case that both the limit and > the size are variable. With set_fs() gone, the limit is always co

Re: [PATCH 14/14] uaccess: drop set_fs leftovers

2022-02-15 Thread Arnd Bergmann
On Tue, Feb 15, 2022 at 8:46 AM Helge Deller wrote: > > On 2/15/22 04:03, Al Viro wrote: > > On Mon, Feb 14, 2022 at 05:34:52PM +0100, Arnd Bergmann wrote: > >> diff --git a/arch/parisc/include/asm/futex.h > >> b/arch/parisc/include/asm/futex.h > >> index b5835325d44b..2f4a1b1ef387 100644 > >> --