Re: [PATCH] arm: put_user: fix possible data corruption in put_user

2014-05-05 Thread Nicolas Pitre
On Mon, 5 May 2014, Andrey Ryabinin wrote: > According to arm procedure call standart r2 register is call-cloberred. > So after the result of x expression was put into r2 any following > function call in p may overwrite r2. To fix this, the result of p > expression must be saved to the temporary v

Re: [PATCH] arm: put_user: fix possible data corruption in put_user

2014-05-05 Thread Nicolas Pitre
On Mon, 5 May 2014, Andrey Ryabinin wrote: > On 05/05/14 13:01, Russell King - ARM Linux wrote: > > On Mon, May 05, 2014 at 10:13:58AM +0400, Andrey Ryabinin wrote: > >> According to arm procedure call standart r2 register is call-cloberred. > >> So after the result of x expression was put into r2

Re: [PATCH] arm: put_user: fix possible data corruption in put_user

2014-05-05 Thread Andrey Ryabinin
On 05/05/14 13:01, Russell King - ARM Linux wrote: > On Mon, May 05, 2014 at 10:13:58AM +0400, Andrey Ryabinin wrote: >> According to arm procedure call standart r2 register is call-cloberred. >> So after the result of x expression was put into r2 any following >> function call in p may overwrite r

Re: [PATCH] arm: put_user: fix possible data corruption in put_user

2014-05-05 Thread Russell King - ARM Linux
On Mon, May 05, 2014 at 10:13:58AM +0400, Andrey Ryabinin wrote: > According to arm procedure call standart r2 register is call-cloberred. > So after the result of x expression was put into r2 any following > function call in p may overwrite r2. To fix this, the result of p > expression must be sav

[PATCH] arm: put_user: fix possible data corruption in put_user

2014-05-04 Thread Andrey Ryabinin
According to arm procedure call standart r2 register is call-cloberred. So after the result of x expression was put into r2 any following function call in p may overwrite r2. To fix this, the result of p expression must be saved to the temporary variable before the assigment x expression to __r2.