Re: [PATCH] powerpc: 32 bit getcpu VDSO function uses 64 bit instructions

2014-11-27 Thread Benjamin Herrenschmidt
On Thu, 2014-11-27 at 14:50 -0600, Segher Boessenkool wrote: > On Thu, Nov 27, 2014 at 11:41:40AM -0600, Peter Bergner wrote: > > On Thu, 2014-11-27 at 10:08 -0600, Segher Boessenkool wrote: > > > On Wed, Nov 26, 2014 at 05:50:27PM -0600, Peter Bergner wrote: > > > > Nope, you don't get a SIGILL wh

Re: [PATCH] powerpc: 32 bit getcpu VDSO function uses 64 bit instructions

2014-11-27 Thread Segher Boessenkool
On Thu, Nov 27, 2014 at 11:41:40AM -0600, Peter Bergner wrote: > On Thu, 2014-11-27 at 10:08 -0600, Segher Boessenkool wrote: > > On Wed, Nov 26, 2014 at 05:50:27PM -0600, Peter Bergner wrote: > > > Nope, you don't get a SIGILL when executing 64-bit instructions in > > > 32-bit mode, so it'll happi

Re: [PATCH] powerpc: 32 bit getcpu VDSO function uses 64 bit instructions

2014-11-27 Thread Andreas Schwab
Segher Boessenkool writes: > On Wed, Nov 26, 2014 at 05:50:27PM -0600, Peter Bergner wrote: >> On Thu, 2014-11-27 at 09:38 +1100, Michael Ellerman wrote: >> > On Thu, 2014-11-27 at 08:11 +1100, Anton Blanchard wrote: >> > > I used some 64 bit instructions when adding the 32 bit getcpu VDSO >> > >

Re: [PATCH] powerpc: 32 bit getcpu VDSO function uses 64 bit instructions

2014-11-27 Thread Peter Bergner
On Thu, 2014-11-27 at 10:08 -0600, Segher Boessenkool wrote: > On Wed, Nov 26, 2014 at 05:50:27PM -0600, Peter Bergner wrote: > > Nope, you don't get a SIGILL when executing 64-bit instructions in > > 32-bit mode, so it'll happily just execute the instruction, doing > > a full 64-bit compare. I'm

Re: [PATCH] powerpc: 32 bit getcpu VDSO function uses 64 bit instructions

2014-11-27 Thread Segher Boessenkool
On Wed, Nov 26, 2014 at 05:50:27PM -0600, Peter Bergner wrote: > On Thu, 2014-11-27 at 09:38 +1100, Michael Ellerman wrote: > > On Thu, 2014-11-27 at 08:11 +1100, Anton Blanchard wrote: > > > I used some 64 bit instructions when adding the 32 bit getcpu VDSO > > > function. Fix it. > > > > Ouch. T

Re: [PATCH] powerpc: 32 bit getcpu VDSO function uses 64 bit instructions

2014-11-26 Thread Peter Bergner
On Thu, 2014-11-27 at 09:38 +1100, Michael Ellerman wrote: > On Thu, 2014-11-27 at 08:11 +1100, Anton Blanchard wrote: > > I used some 64 bit instructions when adding the 32 bit getcpu VDSO > > function. Fix it. > > Ouch. The symptom is a SIGILL I presume? Nope, you don't get a SIGILL when execut

Re: [PATCH] powerpc: 32 bit getcpu VDSO function uses 64 bit instructions

2014-11-26 Thread Segher Boessenkool
On Wed, Nov 26, 2014 at 05:23:18PM -0600, Segher Boessenkool wrote: > GCC has added -many to the assembler flags for over ten years now, so > no that will not work. You can use -mppc or similar with the assembler > if you invoke it correctly (use $(CC) -print-prog-name=as to figure s/correctly/d

Re: [PATCH] powerpc: 32 bit getcpu VDSO function uses 64 bit instructions

2014-11-26 Thread Segher Boessenkool
On Thu, Nov 27, 2014 at 09:38:17AM +1100, Michael Ellerman wrote: > On Thu, 2014-11-27 at 08:11 +1100, Anton Blanchard wrote: > > I used some 64 bit instructions when adding the 32 bit getcpu VDSO > > function. Fix it. > > Ouch. The symptom is a SIGILL I presume? > > Could we catch this by forcin

Re: [PATCH] powerpc: 32 bit getcpu VDSO function uses 64 bit instructions

2014-11-26 Thread Michael Ellerman
On Thu, 2014-11-27 at 08:11 +1100, Anton Blanchard wrote: > I used some 64 bit instructions when adding the 32 bit getcpu VDSO > function. Fix it. Ouch. The symptom is a SIGILL I presume? Could we catch this by forcing -m32 in the CFLAGS for vdso32 ? cheers