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. The symptom

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 Andreas Schwab
Segher Boessenkool seg...@kernel.crashing.org 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

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 happily just

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 when

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

2014-11-26 Thread Anton Blanchard
I used some 64 bit instructions when adding the 32 bit getcpu VDSO function. Fix it. Fixes: 18ad51dd342a (powerpc: Add VDSO version of getcpu) Cc: sta...@vger.kernel.org Signed-off-by: Anton Blanchard an...@samba.org --- arch/powerpc/kernel/vdso32/getcpu.S | 4 ++-- 1 file changed, 2

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

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 forcing -m32

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

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 executing