Re: [PATCH] powerpc/vdso: Avoid link stack corruption in __get_datapage()

2015-09-24 Thread Michael Ellerman
On Thu, 2015-09-24 at 13:10 +0300, Denis Kirjanov wrote: > On 9/24/15, Michael Ellerman wrote: > > On 23 September 2015 16:05:02 GMT+10:00, Michael Neuling > > wrote: > >> > >>Testcase tb.c (stolen from Anton) > >> /* gcc -O2 tb.c -o tb */ > >> #include > >> #include > >> > >> int main() >

Re: [PATCH] powerpc/vdso: Avoid link stack corruption in __get_datapage()

2015-09-24 Thread Denis Kirjanov
On 9/24/15, Michael Ellerman wrote: > > > On 23 September 2015 16:05:02 GMT+10:00, Michael Neuling > wrote: >>The 32 and 64 bit variants of __get_datapage() use a "bcl; mflr" to >>determine the loaded address of the VDSO. The current version of these >>attempt to use the special bcl variant which

Re: [PATCH] powerpc/vdso: Avoid link stack corruption in __get_datapage()

2015-09-23 Thread Michael Neuling
> I've got the following results on POWER7 64bit > without the patch: > # ./tb > time = 0.263337 > # ./tb > time = 0.251273 > # ./tb > time = 0.258453 > # ./tb > time = 0.260189 > > with the patch: > # ./tb > time = 0.241517 > # ./tb > time = 0.241973 > # ./tb > time = 0.239365 > # ./tb > time =

Re: [PATCH] powerpc/vdso: Avoid link stack corruption in __get_datapage()

2015-09-23 Thread Michael Neuling
t; To: Michael Neuling > Cc: Michael Ellerman , benh > , Aaron Sawdey/Rochester/IBM@IBMUS, > linuxppc-dev , Anton Blanchard > , Steve Munroe/Rochester/IBM@IBMUS > Date: 09/23/2015 01:22 PM > Subject: Re: [PATCH] powerpc/vdso: Avoid link stack corruption in > __get_datapage() >

Re: [PATCH] powerpc/vdso: Avoid link stack corruption in __get_datapage()

2015-09-23 Thread Michael Ellerman
On 23 September 2015 16:05:02 GMT+10:00, Michael Neuling wrote: >The 32 and 64 bit variants of __get_datapage() use a "bcl; mflr" to >determine the loaded address of the VDSO. The current version of these >attempt to use the special bcl variant which avoids pushing to the >link stack. > >Unfort

Re: [PATCH] powerpc/vdso: Avoid link stack corruption in __get_datapage()

2015-09-23 Thread Aaron Sawdey
Subject:Re: [PATCH] powerpc/vdso: Avoid link stack corruption in __get_datapage() On 9/23/15, Michael Neuling wrote: > The 32 and 64 bit variants of __get_datapage() use a "bcl; mflr" to > determine the loaded address of the VDSO. The current version of these

Re: [PATCH] powerpc/vdso: Avoid link stack corruption in __get_datapage()

2015-09-23 Thread Denis Kirjanov
On 9/23/15, Michael Neuling wrote: > The 32 and 64 bit variants of __get_datapage() use a "bcl; mflr" to > determine the loaded address of the VDSO. The current version of these > attempt to use the special bcl variant which avoids pushing to the > link stack. > > Unfortunately it uses bcl+8 rathe

[PATCH] powerpc/vdso: Avoid link stack corruption in __get_datapage()

2015-09-22 Thread Michael Neuling
The 32 and 64 bit variants of __get_datapage() use a "bcl; mflr" to determine the loaded address of the VDSO. The current version of these attempt to use the special bcl variant which avoids pushing to the link stack. Unfortunately it uses bcl+8 rather than the required bcl+4. Hence the current co