Re: Regression in kernel 4.12-rc1 for Powerpc 32 - bisected to commit 3448890c32c3

2017-06-26 Thread Michael Ellerman
Larry Finger writes: > On 06/23/2017 03:29 PM, Al Viro wrote: >> On Fri, Jun 23, 2017 at 01:49:16PM -0500, Larry Finger wrote: >> BTW, could you try to check what happens if you kill the if (__builtin_constant_p(n) && (n <= 8)) bits in

Re: gcc 4.6.3 miscompile on ppc32 (was Re: Regression in kernel 4.12-rc1 for Powerpc 32 - bisected to commit 3448890c32c3)

2017-06-26 Thread Michael Ellerman
Al Viro writes: > On Sun, Jun 25, 2017 at 04:44:09PM -0500, Segher Boessenkool wrote: > >> Do you have a short stand-alone testcase? 4.6 is ancient, of course, but >> the actual problem may still exist in more recent compilers (if it _is_ >> a compiler problem; if it's

Re: gcc 4.6.3 miscompile on ppc32 (was Re: Regression in kernel 4.12-rc1 for Powerpc 32 - bisected to commit 3448890c32c3)

2017-06-25 Thread Al Viro
On Sun, Jun 25, 2017 at 04:44:09PM -0500, Segher Boessenkool wrote: > Do you have a short stand-alone testcase? 4.6 is ancient, of course, but > the actual problem may still exist in more recent compilers (if it _is_ > a compiler problem; if it's not, you *really* want to know :-) ) Enjoy. At

Re: gcc 4.6.3 miscompile on ppc32 (was Re: Regression in kernel 4.12-rc1 for Powerpc 32 - bisected to commit 3448890c32c3)

2017-06-25 Thread Segher Boessenkool
On Sun, Jun 25, 2017 at 09:53:24PM +0100, Al Viro wrote: > Confirmed. It manages to bugger the loop immediately after the (successful) > copying of iovec array in rw_copy_check_uvector(); both with and without > INLINE_COPY_FROM_USER it has (just before the call of copy_from_user()) r27 > set to

gcc 4.6.3 miscompile on ppc32 (was Re: Regression in kernel 4.12-rc1 for Powerpc 32 - bisected to commit 3448890c32c3)

2017-06-25 Thread Al Viro
On Sun, Jun 25, 2017 at 12:14:04PM +0100, Al Viro wrote: > On Sun, Jun 25, 2017 at 10:53:58AM +0100, Al Viro wrote: > > On Sat, Jun 24, 2017 at 12:29:23PM -0500, Larry Finger wrote: > > > > > I made a break through. If I turn off inline copy to/from users for 32-bit > > > ppc with the following

Re: Regression in kernel 4.12-rc1 for Powerpc 32 - bisected to commit 3448890c32c3

2017-06-25 Thread Al Viro
On Sun, Jun 25, 2017 at 10:53:58AM +0100, Al Viro wrote: > On Sat, Jun 24, 2017 at 12:29:23PM -0500, Larry Finger wrote: > > > I made a break through. If I turn off inline copy to/from users for 32-bit > > ppc with the following patch, then the system boots: > > OK... So it's 4.6.3 miscompiling

Re: Regression in kernel 4.12-rc1 for Powerpc 32 - bisected to commit 3448890c32c3

2017-06-25 Thread Al Viro
On Sat, Jun 24, 2017 at 12:29:23PM -0500, Larry Finger wrote: > I made a break through. If I turn off inline copy to/from users for 32-bit > ppc with the following patch, then the system boots: OK... So it's 4.6.3 miscompiling something - it is hardware-independent, reproduced in qemu. I'd

Re: Regression in kernel 4.12-rc1 for Powerpc 32 - bisected to commit 3448890c32c3

2017-06-24 Thread Larry Finger
On 06/23/2017 03:29 PM, Al Viro wrote: On Fri, Jun 23, 2017 at 01:49:16PM -0500, Larry Finger wrote: BTW, could you try to check what happens if you kill the if (__builtin_constant_p(n) && (n <= 8)) bits in raw_copy_{to,from}_user()? The usefulness of those (in __copy_from_user()

Re: Regression in kernel 4.12-rc1 for Powerpc 32 - bisected to commit 3448890c32c3

2017-06-23 Thread Al Viro
On Fri, Jun 23, 2017 at 01:49:16PM -0500, Larry Finger wrote: > > BTW, could you try to check what happens if you kill the > > if (__builtin_constant_p(n) && (n <= 8)) > > bits in raw_copy_{to,from}_user()? The usefulness of those (in > > __copy_from_user() > > originally) had always been