Re: [PATCH v2 09/18] mips: use simpler access_ok()

2022-02-23 Thread Linus Torvalds
On Mon, Feb 21, 2022 at 5:25 AM Thomas Bogendoerfer wrote: > > With this patch [ .. snip snip ..] > I at least get my simple test cases fixed, but I'm not sure this is > correct. I think you really want to do that anyway, just to get things like wild kernel pointers right (ie think get_kernel_nof

Re: [PATCH v2 09/18] mips: use simpler access_ok()

2022-02-23 Thread Arnd Bergmann
On Wed, Feb 23, 2022 at 8:41 AM Thomas Bogendoerfer wrote: > > On Wed, Feb 16, 2022 at 02:13:23PM +0100, Arnd Bergmann wrote: > > diff --git a/arch/mips/include/asm/uaccess.h > > b/arch/mips/include/asm/uaccess.h > > index db9a8e002b62..d7c89dc3426c 100644 > > --- a/arch/mips/include/asm/uaccess.

Re: [PATCH v2 09/18] mips: use simpler access_ok()

2022-02-22 Thread Thomas Bogendoerfer
On Wed, Feb 16, 2022 at 02:13:23PM +0100, Arnd Bergmann wrote: > diff --git a/arch/mips/include/asm/uaccess.h b/arch/mips/include/asm/uaccess.h > index db9a8e002b62..d7c89dc3426c 100644 > --- a/arch/mips/include/asm/uaccess.h > +++ b/arch/mips/include/asm/uaccess.h > @@ -19,6 +19,7 @@ > #ifdef CON

Re: [PATCH v2 09/18] mips: use simpler access_ok()

2022-02-22 Thread Thomas Bogendoerfer
On Mon, Feb 21, 2022 at 03:31:23PM +0100, Arnd Bergmann wrote: > I'll update it this way, otherwise I'd need help in form of a patch > that changes the exception handling so __get_user/__put_user > also return -EFAULT for an address error. https://lore.kernel.org/all/20220222155345.138861-1-tsbog.

Re: [PATCH v2 09/18] mips: use simpler access_ok()

2022-02-21 Thread Thomas Bogendoerfer
On Mon, Feb 21, 2022 at 03:31:23PM +0100, Arnd Bergmann wrote: > On Mon, Feb 21, 2022 at 2:24 PM Thomas Bogendoerfer > wrote: > > On Wed, Feb 16, 2022 at 02:13:23PM +0100, Arnd Bergmann wrote: > > > > > > diff --git a/arch/mips/include/asm/uaccess.h > > > b/arch/mips/include/asm/uaccess.h > > > i

Re: [PATCH v2 09/18] mips: use simpler access_ok()

2022-02-21 Thread Arnd Bergmann
On Mon, Feb 21, 2022 at 2:24 PM Thomas Bogendoerfer wrote: > On Wed, Feb 16, 2022 at 02:13:23PM +0100, Arnd Bergmann wrote: > > > > diff --git a/arch/mips/include/asm/uaccess.h > > b/arch/mips/include/asm/uaccess.h > > index db9a8e002b62..d7c89dc3426c 100644 > > this doesn't work. For every acces

Re: [PATCH v2 09/18] mips: use simpler access_ok()

2022-02-21 Thread Thomas Bogendoerfer
On Wed, Feb 16, 2022 at 02:13:23PM +0100, Arnd Bergmann wrote: > > diff --git a/arch/mips/include/asm/uaccess.h b/arch/mips/include/asm/uaccess.h > index db9a8e002b62..d7c89dc3426c 100644 > --- a/arch/mips/include/asm/uaccess.h > +++ b/arch/mips/include/asm/uaccess.h > @@ -19,6 +19,7 @@ > #ifdef

[PATCH v2 09/18] mips: use simpler access_ok()

2022-02-16 Thread Arnd Bergmann
From: Arnd Bergmann Before unifying the mips version of __access_ok() with the generic code, this converts it to the same algorithm. This is a change in behavior on mips64, as now address in the user segment, the lower 2^62 bytes, is taken to be valid, relying on a page fault for addresses that a