Re: [PATCH 1/2] sparc: fix incorrect value returned by copy_from_user_fixup

2016-08-03 Thread David Miller
From: David Miller Date: Tue, 02 Aug 2016 10:47:52 -0700 (PDT) > That's very interesting, let me do some research into this, as I was > pretty sure something like futexes or similar had some requirement in > this area. Mikulas, just wanted to let you know where I am with

Re: [PATCH 1/2] sparc: fix incorrect value returned by copy_from_user_fixup

2016-08-03 Thread David Miller
From: David Miller Date: Tue, 02 Aug 2016 10:47:52 -0700 (PDT) > That's very interesting, let me do some research into this, as I was > pretty sure something like futexes or similar had some requirement in > this area. Mikulas, just wanted to let you know where I am with this. I looked over

Re: [PATCH 1/2] sparc: fix incorrect value returned by copy_from_user_fixup

2016-08-02 Thread David Miller
From: Mikulas Patocka Date: Tue, 2 Aug 2016 08:20:15 -0400 (EDT) > On Mon, 1 Aug 2016, David Miller wrote: > >> From: Mikulas Patocka >> Date: Sun, 31 Jul 2016 19:50:57 -0400 (EDT) >> >> > @@ -18,9 +25,9 @@ >> > * of the cases, just fix things up

Re: [PATCH 1/2] sparc: fix incorrect value returned by copy_from_user_fixup

2016-08-02 Thread David Miller
From: Mikulas Patocka Date: Tue, 2 Aug 2016 08:20:15 -0400 (EDT) > On Mon, 1 Aug 2016, David Miller wrote: > >> From: Mikulas Patocka >> Date: Sun, 31 Jul 2016 19:50:57 -0400 (EDT) >> >> > @@ -18,9 +25,9 @@ >> > * of the cases, just fix things up simply here. >> > */ >> > >> > -static

Re: [PATCH 1/2] sparc: fix incorrect value returned by copy_from_user_fixup

2016-08-02 Thread Mikulas Patocka
On Mon, 1 Aug 2016, David Miller wrote: > From: Mikulas Patocka > Date: Sun, 31 Jul 2016 19:50:57 -0400 (EDT) > > > @@ -18,9 +25,9 @@ > > * of the cases, just fix things up simply here. > > */ > > > > -static unsigned long compute_size(unsigned long start, unsigned

Re: [PATCH 1/2] sparc: fix incorrect value returned by copy_from_user_fixup

2016-08-02 Thread Mikulas Patocka
On Mon, 1 Aug 2016, David Miller wrote: > From: Mikulas Patocka > Date: Sun, 31 Jul 2016 19:50:57 -0400 (EDT) > > > @@ -18,9 +25,9 @@ > > * of the cases, just fix things up simply here. > > */ > > > > -static unsigned long compute_size(unsigned long start, unsigned long size, > >

Re: [PATCH 1/2] sparc: fix incorrect value returned by copy_from_user_fixup

2016-08-01 Thread David Miller
From: Mikulas Patocka Date: Sun, 31 Jul 2016 19:50:57 -0400 (EDT) > @@ -18,9 +25,9 @@ > * of the cases, just fix things up simply here. > */ > > -static unsigned long compute_size(unsigned long start, unsigned long size, > unsigned long *offset) > +static unsigned

Re: [PATCH 1/2] sparc: fix incorrect value returned by copy_from_user_fixup

2016-08-01 Thread David Miller
From: Mikulas Patocka Date: Sun, 31 Jul 2016 19:50:57 -0400 (EDT) > @@ -18,9 +25,9 @@ > * of the cases, just fix things up simply here. > */ > > -static unsigned long compute_size(unsigned long start, unsigned long size, > unsigned long *offset) > +static unsigned long

[PATCH 1/2] sparc: fix incorrect value returned by copy_from_user_fixup

2016-07-31 Thread Mikulas Patocka
When a fault in ___copy_from_user happens, the function copy_from_user_fixup is called. It calls the function compute_size that reads the faulting address from current_thread_info()->fault_address and determines how many bytes were copied. There are multiple ___copy_from_user implementations for

[PATCH 1/2] sparc: fix incorrect value returned by copy_from_user_fixup

2016-07-31 Thread Mikulas Patocka
When a fault in ___copy_from_user happens, the function copy_from_user_fixup is called. It calls the function compute_size that reads the faulting address from current_thread_info()->fault_address and determines how many bytes were copied. There are multiple ___copy_from_user implementations for