Re: [PATCH] powerpc/fault: fix wrong KUAP fault for IO_URING

2021-02-04 Thread Aneesh Kumar K.V
On 2/4/21 11:27 PM, Zorro Lang wrote: On Thu, Feb 04, 2021 at 10:31:59PM +0530, Aneesh Kumar K.V wrote: On 2/4/21 10:23 PM, Jens Axboe wrote: On 2/1/21 11:30 PM, Aneesh Kumar K.V wrote: On 2/2/21 11:50 AM, Christophe Leroy wrote: Le 02/02/2021 à 07:16, Aneesh Kumar K.V a écrit : On 2/2/21

Re: [PATCH] powerpc/fault: fix wrong KUAP fault for IO_URING

2021-02-04 Thread Zorro Lang
On Thu, Feb 04, 2021 at 10:31:59PM +0530, Aneesh Kumar K.V wrote: > On 2/4/21 10:23 PM, Jens Axboe wrote: > > On 2/1/21 11:30 PM, Aneesh Kumar K.V wrote: > > > On 2/2/21 11:50 AM, Christophe Leroy wrote: > > > > > > > > > > > > Le 02/02/2021 à 07:16, Aneesh Kumar K.V a écrit : > > > > > On 2/2/21

Re: [PATCH] powerpc/fault: fix wrong KUAP fault for IO_URING

2021-02-04 Thread Jens Axboe
On 2/4/21 10:01 AM, Aneesh Kumar K.V wrote: > On 2/4/21 10:23 PM, Jens Axboe wrote: >> On 2/1/21 11:30 PM, Aneesh Kumar K.V wrote: >>> On 2/2/21 11:50 AM, Christophe Leroy wrote: Le 02/02/2021 à 07:16, Aneesh Kumar K.V a écrit : > On 2/2/21 11:32 AM, Christophe Leroy wrote: >

Re: [PATCH] powerpc/fault: fix wrong KUAP fault for IO_URING

2021-02-04 Thread Aneesh Kumar K.V
On 2/4/21 10:23 PM, Jens Axboe wrote: On 2/1/21 11:30 PM, Aneesh Kumar K.V wrote: On 2/2/21 11:50 AM, Christophe Leroy wrote: Le 02/02/2021 à 07:16, Aneesh Kumar K.V a écrit : On 2/2/21 11:32 AM, Christophe Leroy wrote: Le 02/02/2021 à 06:55, Aneesh Kumar K.V a écrit : Aneesh Kumar K.V

Re: [PATCH] powerpc/fault: fix wrong KUAP fault for IO_URING

2021-02-04 Thread Jens Axboe
On 2/1/21 11:30 PM, Aneesh Kumar K.V wrote: > On 2/2/21 11:50 AM, Christophe Leroy wrote: >> >> >> Le 02/02/2021 à 07:16, Aneesh Kumar K.V a écrit : >>> On 2/2/21 11:32 AM, Christophe Leroy wrote: Le 02/02/2021 à 06:55, Aneesh Kumar K.V a écrit : > Aneesh Kumar K.V writes: >

Re: [PATCH] powerpc/fault: fix wrong KUAP fault for IO_URING

2021-02-02 Thread Nicholas Piggin
Excerpts from Aneesh Kumar K.V's message of February 2, 2021 4:30 pm: > On 2/2/21 11:50 AM, Christophe Leroy wrote: >> >> >> Le 02/02/2021 à 07:16, Aneesh Kumar K.V a écrit : >>> On 2/2/21 11:32 AM, Christophe Leroy wrote: Le 02/02/2021 à 06:55, Aneesh Kumar K.V a écrit : > Ane

Re: [PATCH] powerpc/fault: fix wrong KUAP fault for IO_URING

2021-02-01 Thread Aneesh Kumar K.V
On 2/2/21 11:50 AM, Christophe Leroy wrote: Le 02/02/2021 à 07:16, Aneesh Kumar K.V a écrit : On 2/2/21 11:32 AM, Christophe Leroy wrote: Le 02/02/2021 à 06:55, Aneesh Kumar K.V a écrit : Aneesh Kumar K.V writes: Nicholas Piggin writes: Excerpts from Michael Ellerman's message of Jan

Re: [PATCH] powerpc/fault: fix wrong KUAP fault for IO_URING

2021-02-01 Thread Christophe Leroy
Le 02/02/2021 à 07:16, Aneesh Kumar K.V a écrit : On 2/2/21 11:32 AM, Christophe Leroy wrote: Le 02/02/2021 à 06:55, Aneesh Kumar K.V a écrit : Aneesh Kumar K.V writes: Nicholas Piggin writes: Excerpts from Michael Ellerman's message of January 30, 2021 9:22 pm: Christophe Leroy wr

Re: [PATCH] powerpc/fault: fix wrong KUAP fault for IO_URING

2021-02-01 Thread Aneesh Kumar K.V
On 2/2/21 11:32 AM, Christophe Leroy wrote: Le 02/02/2021 à 06:55, Aneesh Kumar K.V a écrit : Aneesh Kumar K.V writes: Nicholas Piggin writes: Excerpts from Michael Ellerman's message of January 30, 2021 9:22 pm: Christophe Leroy writes: +Aneesh Le 29/01/2021 à 07:52, Zorro Lang a éc

Re: [PATCH] powerpc/fault: fix wrong KUAP fault for IO_URING

2021-02-01 Thread Christophe Leroy
Le 02/02/2021 à 06:55, Aneesh Kumar K.V a écrit : Aneesh Kumar K.V writes: Nicholas Piggin writes: Excerpts from Michael Ellerman's message of January 30, 2021 9:22 pm: Christophe Leroy writes: +Aneesh Le 29/01/2021 à 07:52, Zorro Lang a écrit : .. [ 96.200296] [ cut

Re: [PATCH] powerpc/fault: fix wrong KUAP fault for IO_URING

2021-02-01 Thread Aneesh Kumar K.V
Aneesh Kumar K.V writes: > Nicholas Piggin writes: > >> Excerpts from Michael Ellerman's message of January 30, 2021 9:22 pm: >>> Christophe Leroy writes: +Aneesh Le 29/01/2021 à 07:52, Zorro Lang a écrit : >>> .. > [ 96.200296] [ cut here ] > [

Re: [PATCH] powerpc/fault: fix wrong KUAP fault for IO_URING

2021-02-01 Thread Aneesh Kumar K.V
Nicholas Piggin writes: > Excerpts from Michael Ellerman's message of January 30, 2021 9:22 pm: >> Christophe Leroy writes: >>> +Aneesh >>> >>> Le 29/01/2021 à 07:52, Zorro Lang a écrit : >> .. [ 96.200296] [ cut here ] [ 96.200304] Bug: Read fault blocked b

Re: [PATCH] powerpc/fault: fix wrong KUAP fault for IO_URING

2021-01-30 Thread Nicholas Piggin
Excerpts from Michael Ellerman's message of January 30, 2021 9:22 pm: > Christophe Leroy writes: >> +Aneesh >> >> Le 29/01/2021 à 07:52, Zorro Lang a écrit : > .. >>> [ 96.200296] [ cut here ] >>> [ 96.200304] Bug: Read fault blocked by KUAP! >>> [ 96.200309] WARNING:

Re: [PATCH] powerpc/fault: fix wrong KUAP fault for IO_URING

2021-01-30 Thread Michael Ellerman
Christophe Leroy writes: > +Aneesh > > Le 29/01/2021 à 07:52, Zorro Lang a écrit : .. >> [ 96.200296] [ cut here ] >> [ 96.200304] Bug: Read fault blocked by KUAP! >> [ 96.200309] WARNING: CPU: 3 PID: 1876 at arch/powerpc/mm/fault.c:229 >> bad_kernel_fault+0x180/0x31

Re: [PATCH] powerpc/fault: fix wrong KUAP fault for IO_URING

2021-01-29 Thread Christophe Leroy
+Aneesh Le 29/01/2021 à 07:52, Zorro Lang a écrit : On Thu, Jan 28, 2021 at 03:44:21PM +0100, Christophe Leroy wrote: Le 28/01/2021 à 15:42, Jens Axboe a écrit : On 1/28/21 6:52 AM, Zorro Lang wrote: On Wed, Jan 27, 2021 at 08:06:37PM -0700, Jens Axboe wrote: On 1/27/21 8:13 PM, Zorro Lang

Re: [PATCH] powerpc/fault: fix wrong KUAP fault for IO_URING

2021-01-28 Thread Zorro Lang
On Thu, Jan 28, 2021 at 03:44:21PM +0100, Christophe Leroy wrote: > > > Le 28/01/2021 à 15:42, Jens Axboe a écrit : > > On 1/28/21 6:52 AM, Zorro Lang wrote: > > > On Wed, Jan 27, 2021 at 08:06:37PM -0700, Jens Axboe wrote: > > > > On 1/27/21 8:13 PM, Zorro Lang wrote: > > > > > On Thu, Jan 28, 2

Re: [PATCH] powerpc/fault: fix wrong KUAP fault for IO_URING

2021-01-28 Thread Zorro Lang
On Thu, Jan 28, 2021 at 03:44:21PM +0100, Christophe Leroy wrote: > > > Le 28/01/2021 à 15:42, Jens Axboe a écrit : > > On 1/28/21 6:52 AM, Zorro Lang wrote: > > > On Wed, Jan 27, 2021 at 08:06:37PM -0700, Jens Axboe wrote: > > > > On 1/27/21 8:13 PM, Zorro Lang wrote: > > > > > On Thu, Jan 28, 2

Re: [PATCH] powerpc/fault: fix wrong KUAP fault for IO_URING

2021-01-28 Thread Christophe Leroy
Le 28/01/2021 à 15:42, Jens Axboe a écrit : On 1/28/21 6:52 AM, Zorro Lang wrote: On Wed, Jan 27, 2021 at 08:06:37PM -0700, Jens Axboe wrote: On 1/27/21 8:13 PM, Zorro Lang wrote: On Thu, Jan 28, 2021 at 10:18:07AM +1000, Nicholas Piggin wrote: Excerpts from Jens Axboe's message of January

Re: [PATCH] powerpc/fault: fix wrong KUAP fault for IO_URING

2021-01-28 Thread Jens Axboe
On 1/28/21 6:52 AM, Zorro Lang wrote: > On Wed, Jan 27, 2021 at 08:06:37PM -0700, Jens Axboe wrote: >> On 1/27/21 8:13 PM, Zorro Lang wrote: >>> On Thu, Jan 28, 2021 at 10:18:07AM +1000, Nicholas Piggin wrote: Excerpts from Jens Axboe's message of January 28, 2021 5:29 am: > On 1/27/21 9:3

Re: [PATCH] powerpc/fault: fix wrong KUAP fault for IO_URING

2021-01-28 Thread Zorro Lang
On Wed, Jan 27, 2021 at 08:06:37PM -0700, Jens Axboe wrote: > On 1/27/21 8:13 PM, Zorro Lang wrote: > > On Thu, Jan 28, 2021 at 10:18:07AM +1000, Nicholas Piggin wrote: > >> Excerpts from Jens Axboe's message of January 28, 2021 5:29 am: > >>> On 1/27/21 9:38 AM, Christophe Leroy wrote: > > >>

Re: [PATCH] powerpc/fault: fix wrong KUAP fault for IO_URING

2021-01-27 Thread Jens Axboe
On 1/27/21 8:13 PM, Zorro Lang wrote: > On Thu, Jan 28, 2021 at 10:18:07AM +1000, Nicholas Piggin wrote: >> Excerpts from Jens Axboe's message of January 28, 2021 5:29 am: >>> On 1/27/21 9:38 AM, Christophe Leroy wrote: Le 27/01/2021 à 15:56, Zorro Lang a écrit : > On powerpc, io

Re: [PATCH] powerpc/fault: fix wrong KUAP fault for IO_URING

2021-01-27 Thread Zorro Lang
On Thu, Jan 28, 2021 at 10:18:07AM +1000, Nicholas Piggin wrote: > Excerpts from Jens Axboe's message of January 28, 2021 5:29 am: > > On 1/27/21 9:38 AM, Christophe Leroy wrote: > >> > >> > >> Le 27/01/2021 à 15:56, Zorro Lang a écrit : > >>> On powerpc, io_uring test hit below KUAP fault on __d

Re: [PATCH] powerpc/fault: fix wrong KUAP fault for IO_URING

2021-01-27 Thread Nicholas Piggin
Excerpts from Jens Axboe's message of January 28, 2021 5:29 am: > On 1/27/21 9:38 AM, Christophe Leroy wrote: >> >> >> Le 27/01/2021 à 15:56, Zorro Lang a écrit : >>> On powerpc, io_uring test hit below KUAP fault on __do_page_fault. >>> The fail source line is: >>> >>>if (unlikely(!is_user &

Re: [PATCH] powerpc/fault: fix wrong KUAP fault for IO_URING

2021-01-27 Thread Jens Axboe
On 1/27/21 9:38 AM, Christophe Leroy wrote: > > > Le 27/01/2021 à 15:56, Zorro Lang a écrit : >> On powerpc, io_uring test hit below KUAP fault on __do_page_fault. >> The fail source line is: >> >>if (unlikely(!is_user && bad_kernel_fault(regs, error_code, address, >> is_write))) >>r

Re: [PATCH] powerpc/fault: fix wrong KUAP fault for IO_URING

2021-01-27 Thread Christophe Leroy
Le 27/01/2021 à 15:56, Zorro Lang a écrit : On powerpc, io_uring test hit below KUAP fault on __do_page_fault. The fail source line is: if (unlikely(!is_user && bad_kernel_fault(regs, error_code, address, is_write))) return SIGSEGV; The is_user() is based on user_mod(regs) only. T

[PATCH] powerpc/fault: fix wrong KUAP fault for IO_URING

2021-01-27 Thread Zorro Lang
On powerpc, io_uring test hit below KUAP fault on __do_page_fault. The fail source line is: if (unlikely(!is_user && bad_kernel_fault(regs, error_code, address, is_write))) return SIGSEGV; The is_user() is based on user_mod(regs) only. This's not suit for io_uring, where the helper threa