Re: [PATCH 1/1] futex: remove duplicated code and fix UB

2017-07-03 Thread Thomas Gleixner
On Mon, 26 Jun 2017, Jiri Slaby wrote: > On 06/23/2017, 09:51 AM, Thomas Gleixner wrote: > > On Wed, 21 Jun 2017, Jiri Slaby wrote: > >> diff --git a/arch/arm64/include/asm/futex.h > >> b/arch/arm64/include/asm/futex.h > >> index f32b42e8725d..5bb2fd4674e7 100644 > >> ---

Re: [PATCH 1/1] futex: remove duplicated code and fix UB

2017-07-03 Thread Thomas Gleixner
On Mon, 26 Jun 2017, Jiri Slaby wrote: > On 06/23/2017, 09:51 AM, Thomas Gleixner wrote: > > On Wed, 21 Jun 2017, Jiri Slaby wrote: > >> diff --git a/arch/arm64/include/asm/futex.h > >> b/arch/arm64/include/asm/futex.h > >> index f32b42e8725d..5bb2fd4674e7 100644 > >> ---

Re: [PATCH 1/1] futex: remove duplicated code and fix UB

2017-06-26 Thread Will Deacon
On Mon, Jun 26, 2017 at 02:02:31PM +0200, Jiri Slaby wrote: > On 06/23/2017, 09:51 AM, Thomas Gleixner wrote: > > On Wed, 21 Jun 2017, Jiri Slaby wrote: > >> diff --git a/arch/arm64/include/asm/futex.h > >> b/arch/arm64/include/asm/futex.h > >> index f32b42e8725d..5bb2fd4674e7 100644 > >> ---

Re: [PATCH 1/1] futex: remove duplicated code and fix UB

2017-06-26 Thread Will Deacon
On Mon, Jun 26, 2017 at 02:02:31PM +0200, Jiri Slaby wrote: > On 06/23/2017, 09:51 AM, Thomas Gleixner wrote: > > On Wed, 21 Jun 2017, Jiri Slaby wrote: > >> diff --git a/arch/arm64/include/asm/futex.h > >> b/arch/arm64/include/asm/futex.h > >> index f32b42e8725d..5bb2fd4674e7 100644 > >> ---

Re: [PATCH 1/1] futex: remove duplicated code and fix UB

2017-06-26 Thread Jiri Slaby
On 06/23/2017, 09:51 AM, Thomas Gleixner wrote: > On Wed, 21 Jun 2017, Jiri Slaby wrote: >> diff --git a/arch/arm64/include/asm/futex.h b/arch/arm64/include/asm/futex.h >> index f32b42e8725d..5bb2fd4674e7 100644 >> --- a/arch/arm64/include/asm/futex.h >> +++ b/arch/arm64/include/asm/futex.h >> @@

Re: [PATCH 1/1] futex: remove duplicated code and fix UB

2017-06-26 Thread Jiri Slaby
On 06/23/2017, 09:51 AM, Thomas Gleixner wrote: > On Wed, 21 Jun 2017, Jiri Slaby wrote: >> diff --git a/arch/arm64/include/asm/futex.h b/arch/arm64/include/asm/futex.h >> index f32b42e8725d..5bb2fd4674e7 100644 >> --- a/arch/arm64/include/asm/futex.h >> +++ b/arch/arm64/include/asm/futex.h >> @@

Re: [PATCH 1/1] futex: remove duplicated code and fix UB

2017-06-23 Thread Thomas Gleixner
On Wed, 21 Jun 2017, Jiri Slaby wrote: > diff --git a/arch/arm64/include/asm/futex.h b/arch/arm64/include/asm/futex.h > index f32b42e8725d..5bb2fd4674e7 100644 > --- a/arch/arm64/include/asm/futex.h > +++ b/arch/arm64/include/asm/futex.h > @@ -48,20 +48,10 @@ do {

Re: [PATCH 1/1] futex: remove duplicated code and fix UB

2017-06-23 Thread Thomas Gleixner
On Wed, 21 Jun 2017, Jiri Slaby wrote: > diff --git a/arch/arm64/include/asm/futex.h b/arch/arm64/include/asm/futex.h > index f32b42e8725d..5bb2fd4674e7 100644 > --- a/arch/arm64/include/asm/futex.h > +++ b/arch/arm64/include/asm/futex.h > @@ -48,20 +48,10 @@ do {

Re: [PATCH 1/1] futex: remove duplicated code and fix UB

2017-06-21 Thread Darren Hart
On Wed, Jun 21, 2017 at 01:53:18PM +0200, Jiri Slaby wrote: > There is code duplicated over all architecture's headers for > futex_atomic_op_inuser. Namely op decoding, access_ok check for uaddr, > and comparison of the result. > > Remove this duplication and leave up to the arches only the

Re: [PATCH 1/1] futex: remove duplicated code and fix UB

2017-06-21 Thread Darren Hart
On Wed, Jun 21, 2017 at 01:53:18PM +0200, Jiri Slaby wrote: > There is code duplicated over all architecture's headers for > futex_atomic_op_inuser. Namely op decoding, access_ok check for uaddr, > and comparison of the result. > > Remove this duplication and leave up to the arches only the

[PATCH 1/1] futex: remove duplicated code and fix UB

2017-06-21 Thread Jiri Slaby
There is code duplicated over all architecture's headers for futex_atomic_op_inuser. Namely op decoding, access_ok check for uaddr, and comparison of the result. Remove this duplication and leave up to the arches only the needed assembly which is now in arch_futex_atomic_op_inuser. This

[PATCH 1/1] futex: remove duplicated code and fix UB

2017-06-21 Thread Jiri Slaby
There is code duplicated over all architecture's headers for futex_atomic_op_inuser. Namely op decoding, access_ok check for uaddr, and comparison of the result. Remove this duplication and leave up to the arches only the needed assembly which is now in arch_futex_atomic_op_inuser. This

Re: [PATCH 1/1] futex: remove duplicated code

2017-05-26 Thread Thomas Gleixner
On Thu, 25 May 2017, Will Deacon wrote: > On Mon, May 22, 2017 at 11:11:33PM +0200, Thomas Gleixner wrote: > > On Mon, 15 May 2017, Will Deacon wrote: > > > On Mon, May 15, 2017 at 03:07:42PM +0200, Jiri Slaby wrote: > > > > There is code duplicated over all architecture's headers for > > > >

Re: [PATCH 1/1] futex: remove duplicated code

2017-05-26 Thread Thomas Gleixner
On Thu, 25 May 2017, Will Deacon wrote: > On Mon, May 22, 2017 at 11:11:33PM +0200, Thomas Gleixner wrote: > > On Mon, 15 May 2017, Will Deacon wrote: > > > On Mon, May 15, 2017 at 03:07:42PM +0200, Jiri Slaby wrote: > > > > There is code duplicated over all architecture's headers for > > > >

Re: [PATCH 1/1] futex: remove duplicated code

2017-05-25 Thread Will Deacon
On Mon, May 22, 2017 at 11:11:33PM +0200, Thomas Gleixner wrote: > On Mon, 15 May 2017, Will Deacon wrote: > > On Mon, May 15, 2017 at 03:07:42PM +0200, Jiri Slaby wrote: > > > There is code duplicated over all architecture's headers for > > > futex_atomic_op_inuser. Namely op decoding, access_ok

Re: [PATCH 1/1] futex: remove duplicated code

2017-05-25 Thread Will Deacon
On Mon, May 22, 2017 at 11:11:33PM +0200, Thomas Gleixner wrote: > On Mon, 15 May 2017, Will Deacon wrote: > > On Mon, May 15, 2017 at 03:07:42PM +0200, Jiri Slaby wrote: > > > There is code duplicated over all architecture's headers for > > > futex_atomic_op_inuser. Namely op decoding, access_ok

Re: [PATCH 1/1] futex: remove duplicated code

2017-05-22 Thread Thomas Gleixner
On Mon, 15 May 2017, Will Deacon wrote: > Hi Jiri, > > On Mon, May 15, 2017 at 03:07:42PM +0200, Jiri Slaby wrote: > > There is code duplicated over all architecture's headers for > > futex_atomic_op_inuser. Namely op decoding, access_ok check for uaddr, > > and comparison of the result. > > > >

Re: [PATCH 1/1] futex: remove duplicated code

2017-05-22 Thread Thomas Gleixner
On Mon, 15 May 2017, Will Deacon wrote: > Hi Jiri, > > On Mon, May 15, 2017 at 03:07:42PM +0200, Jiri Slaby wrote: > > There is code duplicated over all architecture's headers for > > futex_atomic_op_inuser. Namely op decoding, access_ok check for uaddr, > > and comparison of the result. > > > >

Re: [PATCH 1/1] futex: remove duplicated code

2017-05-18 Thread Will Deacon
On Wed, May 17, 2017 at 10:01:29AM +0200, Jiri Slaby wrote: > On 05/15/2017, 03:16 PM, Will Deacon wrote: > > Whilst I think this is a good idea, the code in question actually results > > in undefined behaviour per the C spec and is reported by UBSAN. > > Hi, yes, I know -- this patch was the 1st

Re: [PATCH 1/1] futex: remove duplicated code

2017-05-18 Thread Will Deacon
On Wed, May 17, 2017 at 10:01:29AM +0200, Jiri Slaby wrote: > On 05/15/2017, 03:16 PM, Will Deacon wrote: > > Whilst I think this is a good idea, the code in question actually results > > in undefined behaviour per the C spec and is reported by UBSAN. > > Hi, yes, I know -- this patch was the 1st

Re: [PATCH 1/1] futex: remove duplicated code

2017-05-17 Thread Jiri Slaby
On 05/15/2017, 03:16 PM, Will Deacon wrote: > Whilst I think this is a good idea, the code in question actually results > in undefined behaviour per the C spec and is reported by UBSAN. Hi, yes, I know -- this patch was the 1st from the series of 3 which I sent a long time ago to fix that up too.

Re: [PATCH 1/1] futex: remove duplicated code

2017-05-17 Thread Jiri Slaby
On 05/15/2017, 03:16 PM, Will Deacon wrote: > Whilst I think this is a good idea, the code in question actually results > in undefined behaviour per the C spec and is reported by UBSAN. Hi, yes, I know -- this patch was the 1st from the series of 3 which I sent a long time ago to fix that up too.

Re: [PATCH 1/1] futex: remove duplicated code

2017-05-15 Thread Will Deacon
Hi Jiri, On Mon, May 15, 2017 at 03:07:42PM +0200, Jiri Slaby wrote: > There is code duplicated over all architecture's headers for > futex_atomic_op_inuser. Namely op decoding, access_ok check for uaddr, > and comparison of the result. > > Remove this duplication and leave up to the arches only

Re: [PATCH 1/1] futex: remove duplicated code

2017-05-15 Thread Will Deacon
Hi Jiri, On Mon, May 15, 2017 at 03:07:42PM +0200, Jiri Slaby wrote: > There is code duplicated over all architecture's headers for > futex_atomic_op_inuser. Namely op decoding, access_ok check for uaddr, > and comparison of the result. > > Remove this duplication and leave up to the arches only

[PATCH 1/1] futex: remove duplicated code

2017-05-15 Thread Jiri Slaby
There is code duplicated over all architecture's headers for futex_atomic_op_inuser. Namely op decoding, access_ok check for uaddr, and comparison of the result. Remove this duplication and leave up to the arches only the needed assembly which is now in arch_futex_atomic_op_inuser. Note that

[PATCH 1/1] futex: remove duplicated code

2017-05-15 Thread Jiri Slaby
There is code duplicated over all architecture's headers for futex_atomic_op_inuser. Namely op decoding, access_ok check for uaddr, and comparison of the result. Remove this duplication and leave up to the arches only the needed assembly which is now in arch_futex_atomic_op_inuser. Note that