* [sparc64] kernel OOPS with gcc 7.1 / 7.2
@ 2017-08-15 18:50 Anatoly Pugachev
2017-08-15 20:08 ` Sam Ravnborg
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: Anatoly Pugachev @ 2017-08-15 18:50 UTC (permalink / raw)
To: sparclinux
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="windows-1254", Size: 6379 bytes --]
Hello.
Together with Dmitry (ldv) , we've discovered that running test suite
from strace produces kernel OOPS, when kernel is compiled with gcc 7.1
or with gcc 7.2 , but not with gcc 6 :
$ git clone https://github.com/strace/strace.git
ttip:~/strace$ ./bootstrap
ttip:~/strace$ ./configure && make -j
ttip:~/strace$ cd tests-m32 && make mq
ttip:~/strace/tests-m32$ ./mq
Killed
kernel log:
[ 61.839563] Unable to handle kernel NULL pointer dereference
[ 61.839649] tsk->{mm,active_mm}->context = 000000000000040e
[ 61.839686] tsk->{mm,active_mm}->pgd = fff8004099e06000
[ 61.839721] \|/ ____ \|/
[ 61.839721] "@'/ .. \`@"
[ 61.839721] /_| \__/ |_\
[ 61.839721] \__U_/
[ 61.839879] mq(937): Oops [#1]
[ 61.839909] CPU: 10 PID: 937 Comm: mq Not tainted
4.13.0-rc5-00009-gfcd07350007b #412
[ 61.839958] task: fff80040968ed940 task.stack: fff800409c26c000
[ 61.839997] TSTATE: 0000004411001600 TPC: 000000000069fb2c TNPC:
000000000069fb30 Y: 000002f7 Not tainted
[ 61.840062] TPC: <current_umask+0xc/0x20>
[ 61.840091] g0: fff8004096588400 g1: 00000000000143c0 g2:
000000000000000a g3: 0000000000000000
[ 61.840143] g4: 0000000000000000 g5: 0000000000000000 g6:
fff800409c26c000 g7: 000000000000000a
[ 61.840196] o0: 0000000000000000 o1: 0000000000014000 o2:
0000000000000000 o3: 000000000000000a
[ 61.840247] o4: 0000000000000001 o5: 0000000000000000 sp:
fff800409c26f3e1 ret_pc: 00000000007072d0
[ 61.840308] RPC: <mq_attr_ok.isra.1+0x90/0x100>
[ 61.840341] l0: 00000000000000da l1: 00000000f7c87bf0 l2:
00000000f7c34000 l3: 0000000000000000
[ 61.840395] l4: 00000000f7c86100 l5: 0000000000000000 l6:
000000017c96f087 l7: 00000000f7c86000
[ 61.840450] i0: 0000000000000000 i1: 0000000000c4e924 i2:
fff800409c26fd58 i3: fff800409c26fd60
[ 61.840504] i4: 0000000000014000 i5: 0000000000000014 i6:
fff800409c26f491 i7: 00000000007074fc
[ 61.840560] I7: <do_mq_open+0x1bc/0x320>
[ 61.840590] Call Trace:
[ 61.840614] [00000000007074fc] do_mq_open+0x1bc/0x320
[ 61.840652] [000000000070839c] compat_SyS_mq_open+0x5c/0xa0
[ 61.840694] [00000000004061d4] linux_sparc_syscall32+0x34/0x60
[ 61.840734] Disabling lock debugging due to kernel taint
[ 61.840756] Caller[00000000007074fc]: do_mq_open+0x1bc/0x320
[ 61.840778] Caller[000000000070839c]: compat_SyS_mq_open+0x5c/0xa0
[ 61.840800] Caller[00000000004061d4]: linux_sparc_syscall32+0x34/0x60
[ 61.840824] Caller[00000000f7c3c7fc]: 0xf7c3c7fc
[ 61.840842] Instruction DUMP:
[ 61.840846] 9de3bf50
[ 61.840860] 01000000
[ 61.840872] 01000000
[ 61.840885] <c2592720>
[ 61.840897] 81cfe008
[ 61.840910] d0406068
[ 61.840922] 01000000
[ 61.840935] 01000000
[ 61.840947] 9de3bf30
[ 61.840960]
And if kernel is compiled with gcc 6 , test ends in other way:
ttip:~$ cd strace/tests-m32/ && ./mq
mq_open("strace-mq-910.sample", O_RDONLY|O_CREAT, 0700, NULL) = 0
mq_getsetattr(0, NULL, {mq_flags=0, mq_maxmsg\x10, mq_msgsize92,
mq_curmsgs=0}) = 0
mq_getsetattr(0, {mq_flags=0, mq_maxmsg\x10, mq_msgsize92,
mq_curmsgs=0}, NULL) = 0
mq_unlink("strace-mq-910.sample") = 0
+++ exited with 0 +++
and nothing is printed in kernel logs.
versions of used gcc and kernels:
gcc 6 compiled kernel is git 4.13.0-rc5
gcc 7.2 compiled kernel is git 4.13.0-rc5-00009-gfcd07350007b
$ gcc-6 -v
Using built-in specs.
COLLECT_GCC=gcc-6
COLLECT_LTO_WRAPPER=/usr/lib/gcc/sparc64-linux-gnu/6/lto-wrapper
Target: sparc64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian
6.4.0-3' --with-bugurl=file:///usr/share/doc/gcc-6/README.Bugs
--enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++
--prefix=/usr --program-suffix=-6 --program-prefix=sparc64-linux-gnu-
--enable-shared --enable-linker-build-id --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix --libdir=/usr/lib
--enable-nls --with-sysroot=/ --enable-clocale=gnu
--enable-libstdcxx-debug --enable-libstdcxx-time=yes
--with-default-libstdcxx-abi=new --enable-gnu-unique-object
--disable-libquadmath --enable-plugin --enable-default-pie
--with-system-zlib --disable-browser-plugin --enable-java-awt=gtk
--enable-gtk-cairo
--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-6-sparc64/jre
--enable-java-home
--with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-6-sparc64
--with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-6-sparc64
--with-arch-directory=sparc64
--with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc=auto
--enable-multiarch --enable-targets=all --with-cpu-32=ultrasparc
--with-long-double-128 --enable-multilib --enable-checking=release
--build=sparc64-linux-gnu --host=sparc64-linux-gnu
--target=sparc64-linux-gnu
Thread model: posix
gcc version 6.4.0 20170805 (Debian 6.4.0-3)
$ gcc-7 -v
Using built-in specs.
COLLECT_GCC=gcc-7
COLLECT_LTO_WRAPPER=/usr/lib/gcc/sparc64-linux-gnu/7/lto-wrapper
Target: sparc64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian
7.1.0-13' --with-bugurl=file:///usr/share/doc/gcc-7/README.Bugs
--enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++ --prefix=/usr
--with-gcc-major-version-only --program-suffix=-7
--program-prefix=sparc64-linux-gnu- --enable-shared
--enable-linker-build-id --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix --libdir=/usr/lib
--enable-nls --with-sysroot=/ --enable-clocale=gnu
--enable-libstdcxx-debug --enable-libstdcxx-time=yes
--with-default-libstdcxx-abi=new --enable-gnu-unique-object
--disable-libquadmath --enable-plugin --enable-default-pie
--with-system-zlib --enable-objc-gc=auto --enable-multiarch
--disable-werror --with-cpu-32=ultrasparc --enable-targets=all
--with-long-double-128 --enable-multilib --enable-checking=release
--build=sparc64-linux-gnu --host=sparc64-linux-gnu
--target=sparc64-linux-gnu
Thread model: posix
gcc version 7.1.0 (Debian 7.1.0-13)
$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/opt/gcc72/libexec/gcc/sparc64-unknown-linux-gnu/7.2.0/lto-wrapper
Target: sparc64-unknown-linux-gnu
Configured with: ../gcc-7.2.0/configure --prefix=/opt/gcc72
Thread model: posix
gcc version 7.2.0 (GCC)
Machine is LDOM debian sid sparc64.
--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [sparc64] kernel OOPS with gcc 7.1 / 7.2
2017-08-15 18:50 [sparc64] kernel OOPS with gcc 7.1 / 7.2 Anatoly Pugachev
@ 2017-08-15 20:08 ` Sam Ravnborg
2017-08-15 20:35 ` Anatoly Pugachev
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Sam Ravnborg @ 2017-08-15 20:08 UTC (permalink / raw)
To: sparclinux
Hi Anatoly.
On Tue, Aug 15, 2017 at 09:50:45PM +0300, Anatoly Pugachev wrote:
> Hello.
>
> Together with Dmitry (ldv) , we've discovered that running test suite
> from strace produces kernel OOPS, when kernel is compiled with gcc 7.1
> or with gcc 7.2 , but not with gcc 6 :
First, could you please verify if you have following fix in your kernel.
This fixed a similar oops when runnign strace test suite.
And was only seen on ultrasparc-III
Sam
commit 0ede1c401332173ab0693121dc6cde04a4dbf131
Author: David S. Miller <davem@davemloft.net>
Date: Fri Aug 4 09:47:52 2017 -0700
sparc64: Fix exception handling in UltraSPARC-III memcpy.
Mikael Pettersson reported that some test programs in the strace-4.18
testsuite cause an OOPS.
After some debugging it turns out that garbage values are returned
when an exception occurs, causing the fixup memset() to be run with
bogus arguments.
The problem is that two of the exception handler stubs write the
successfully copied length into the wrong register.
Fixes: ee841d0aff64 ("sparc64: Convert U3copy_{from,to}_user to accurate exception reporting.")
Reported-by: Mikael Pettersson <mikpelinux@gmail.com>
Tested-by: Mikael Pettersson <mikpelinux@gmail.com>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [sparc64] kernel OOPS with gcc 7.1 / 7.2
2017-08-15 18:50 [sparc64] kernel OOPS with gcc 7.1 / 7.2 Anatoly Pugachev
2017-08-15 20:08 ` Sam Ravnborg
@ 2017-08-15 20:35 ` Anatoly Pugachev
2017-08-16 0:45 ` Anthony Yznaga
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Anatoly Pugachev @ 2017-08-15 20:35 UTC (permalink / raw)
To: sparclinux
On Tue, Aug 15, 2017 at 11:08 PM, Sam Ravnborg <sam@ravnborg.org> wrote:
> Hi Anatoly.
>
> On Tue, Aug 15, 2017 at 09:50:45PM +0300, Anatoly Pugachev wrote:
>> Hello.
>>
>> Together with Dmitry (ldv) , we've discovered that running test suite
>> from strace produces kernel OOPS, when kernel is compiled with gcc 7.1
>> or with gcc 7.2 , but not with gcc 6 :
>
> First, could you please verify if you have following fix in your kernel.
> This fixed a similar oops when runnign strace test suite.
> And was only seen on ultrasparc-III
>
> Sam
>
>
>
> commit 0ede1c401332173ab0693121dc6cde04a4dbf131
> Author: David S. Miller <davem@davemloft.net>
> Date: Fri Aug 4 09:47:52 2017 -0700
>
> sparc64: Fix exception handling in UltraSPARC-III memcpy.
Sam,
it is in the git tree I'm using to compile kernel :
$ git show -s --oneline 0ede1c401332173ab0693121dc6cde04a4dbf131
0ede1c401332 sparc64: Fix exception handling in UltraSPARC-III memcpy.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [sparc64] kernel OOPS with gcc 7.1 / 7.2
2017-08-15 18:50 [sparc64] kernel OOPS with gcc 7.1 / 7.2 Anatoly Pugachev
2017-08-15 20:08 ` Sam Ravnborg
2017-08-15 20:35 ` Anatoly Pugachev
@ 2017-08-16 0:45 ` Anthony Yznaga
2017-08-16 0:51 ` David Miller
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Anthony Yznaga @ 2017-08-16 0:45 UTC (permalink / raw)
To: sparclinux
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="windows-1254", Size: 7690 bytes --]
> On Aug 15, 2017, at 11:50 AM, Anatoly Pugachev <matorola@gmail.com> wrote:
>
> Hello.
>
> Together with Dmitry (ldv) , we've discovered that running test suite
> from strace produces kernel OOPS, when kernel is compiled with gcc 7.1
> or with gcc 7.2 , but not with gcc 6 :
>
> $ git clone https://github.com/strace/strace.git
> ttip:~/strace$ ./bootstrap
> ttip:~/strace$ ./configure && make -j
> ttip:~/strace$ cd tests-m32 && make mq
> ttip:~/strace/tests-m32$ ./mq
> Killed
>
> kernel log:
>
> [ 61.839563] Unable to handle kernel NULL pointer dereference
> [ 61.839649] tsk->{mm,active_mm}->context = 000000000000040e
> [ 61.839686] tsk->{mm,active_mm}->pgd = fff8004099e06000
> [ 61.839721] \|/ ____ \|/
> [ 61.839721] "@'/ .. \`@"
> [ 61.839721] /_| \__/ |_\
> [ 61.839721] \__U_/
> [ 61.839879] mq(937): Oops [#1]
> [ 61.839909] CPU: 10 PID: 937 Comm: mq Not tainted
> 4.13.0-rc5-00009-gfcd07350007b #412
> [ 61.839958] task: fff80040968ed940 task.stack: fff800409c26c000
> [ 61.839997] TSTATE: 0000004411001600 TPC: 000000000069fb2c TNPC:
> 000000000069fb30 Y: 000002f7 Not tainted
> [ 61.840062] TPC: <current_umask+0xc/0x20>
> [ 61.840091] g0: fff8004096588400 g1: 00000000000143c0 g2:
> 000000000000000a g3: 0000000000000000
> [ 61.840143] g4: 0000000000000000 g5: 0000000000000000 g6:
> fff800409c26c000 g7: 000000000000000a
> [ 61.840196] o0: 0000000000000000 o1: 0000000000014000 o2:
> 0000000000000000 o3: 000000000000000a
> [ 61.840247] o4: 0000000000000001 o5: 0000000000000000 sp:
> fff800409c26f3e1 ret_pc: 00000000007072d0
> [ 61.840308] RPC: <mq_attr_ok.isra.1+0x90/0x100>
> [ 61.840341] l0: 00000000000000da l1: 00000000f7c87bf0 l2:
> 00000000f7c34000 l3: 0000000000000000
> [ 61.840395] l4: 00000000f7c86100 l5: 0000000000000000 l6:
> 000000017c96f087 l7: 00000000f7c86000
> [ 61.840450] i0: 0000000000000000 i1: 0000000000c4e924 i2:
> fff800409c26fd58 i3: fff800409c26fd60
> [ 61.840504] i4: 0000000000014000 i5: 0000000000000014 i6:
> fff800409c26f491 i7: 00000000007074fc
> [ 61.840560] I7: <do_mq_open+0x1bc/0x320>
> [ 61.840590] Call Trace:
> [ 61.840614] [00000000007074fc] do_mq_open+0x1bc/0x320
> [ 61.840652] [000000000070839c] compat_SyS_mq_open+0x5c/0xa0
> [ 61.840694] [00000000004061d4] linux_sparc_syscall32+0x34/0x60
> [ 61.840734] Disabling lock debugging due to kernel taint
> [ 61.840756] Caller[00000000007074fc]: do_mq_open+0x1bc/0x320
> [ 61.840778] Caller[000000000070839c]: compat_SyS_mq_open+0x5c/0xa0
> [ 61.840800] Caller[00000000004061d4]: linux_sparc_syscall32+0x34/0x60
> [ 61.840824] Caller[00000000f7c3c7fc]: 0xf7c3c7fc
> [ 61.840842] Instruction DUMP:
> [ 61.840846] 9de3bf50
> [ 61.840860] 01000000
> [ 61.840872] 01000000
> [ 61.840885] <c2592720>
> [ 61.840897] 81cfe008
> [ 61.840910] d0406068
> [ 61.840922] 01000000
> [ 61.840935] 01000000
> [ 61.840947] 9de3bf30
> [ 61.840960]
The panic happens in current_umask() on this instruction which
fetches current->fs:
ldx [%g4 + 0x720], %g1
%g4 is expected to be the current task pointer, but from the log
messages above, %g4 and %g5 are 0. %g4 and %g5 are set to the current
task pointer and the current CPU base pointer respectively in etrap and
expected to be preserved while executing in the kernel.
I compiled a kernel with gcc 7 and found that the compiler inserted a
call to __multi3() in mq_attr_ok(). The sparc64 implementation of
__multi3() was added by 1b4af13ff2cc specifically for gcc 7 and later,
but it clobbers %g4 and %g5. Not sure if that was intended but it
looks like __multi3() is not safe to call from kernel code.
Anthony
>
> And if kernel is compiled with gcc 6 , test ends in other way:
>
> ttip:~$ cd strace/tests-m32/ && ./mq
> mq_open("strace-mq-910.sample", O_RDONLY|O_CREAT, 0700, NULL) = 0
> mq_getsetattr(0, NULL, {mq_flags=0, mq_maxmsg\x10, mq_msgsize92,
> mq_curmsgs=0}) = 0
> mq_getsetattr(0, {mq_flags=0, mq_maxmsg\x10, mq_msgsize92,
> mq_curmsgs=0}, NULL) = 0
> mq_unlink("strace-mq-910.sample") = 0
> +++ exited with 0 +++
>
> and nothing is printed in kernel logs.
>
> versions of used gcc and kernels:
>
> gcc 6 compiled kernel is git 4.13.0-rc5
> gcc 7.2 compiled kernel is git 4.13.0-rc5-00009-gfcd07350007b
>
> $ gcc-6 -v
> Using built-in specs.
> COLLECT_GCC=gcc-6
> COLLECT_LTO_WRAPPER=/usr/lib/gcc/sparc64-linux-gnu/6/lto-wrapper
> Target: sparc64-linux-gnu
> Configured with: ../src/configure -v --with-pkgversion='Debian
> 6.4.0-3' --with-bugurl=file:///usr/share/doc/gcc-6/README.Bugs
> --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++
> --prefix=/usr --program-suffix=-6 --program-prefix=sparc64-linux-gnu-
> --enable-shared --enable-linker-build-id --libexecdir=/usr/lib
> --without-included-gettext --enable-threads=posix --libdir=/usr/lib
> --enable-nls --with-sysroot=/ --enable-clocale=gnu
> --enable-libstdcxx-debug --enable-libstdcxx-time=yes
> --with-default-libstdcxx-abi=new --enable-gnu-unique-object
> --disable-libquadmath --enable-plugin --enable-default-pie
> --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk
> --enable-gtk-cairo
> --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-6-sparc64/jre
> --enable-java-home
> --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-6-sparc64
> --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-6-sparc64
> --with-arch-directory=sparc64
> --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc=auto
> --enable-multiarch --enable-targets=all --with-cpu-32=ultrasparc
> --with-long-double-128 --enable-multilib --enable-checking=release
> --build=sparc64-linux-gnu --host=sparc64-linux-gnu
> --target=sparc64-linux-gnu
> Thread model: posix
> gcc version 6.4.0 20170805 (Debian 6.4.0-3)
>
> $ gcc-7 -v
> Using built-in specs.
> COLLECT_GCC=gcc-7
> COLLECT_LTO_WRAPPER=/usr/lib/gcc/sparc64-linux-gnu/7/lto-wrapper
> Target: sparc64-linux-gnu
> Configured with: ../src/configure -v --with-pkgversion='Debian
> 7.1.0-13' --with-bugurl=file:///usr/share/doc/gcc-7/README.Bugs
> --enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++ --prefix=/usr
> --with-gcc-major-version-only --program-suffix=-7
> --program-prefix=sparc64-linux-gnu- --enable-shared
> --enable-linker-build-id --libexecdir=/usr/lib
> --without-included-gettext --enable-threads=posix --libdir=/usr/lib
> --enable-nls --with-sysroot=/ --enable-clocale=gnu
> --enable-libstdcxx-debug --enable-libstdcxx-time=yes
> --with-default-libstdcxx-abi=new --enable-gnu-unique-object
> --disable-libquadmath --enable-plugin --enable-default-pie
> --with-system-zlib --enable-objc-gc=auto --enable-multiarch
> --disable-werror --with-cpu-32=ultrasparc --enable-targets=all
> --with-long-double-128 --enable-multilib --enable-checking=release
> --build=sparc64-linux-gnu --host=sparc64-linux-gnu
> --target=sparc64-linux-gnu
> Thread model: posix
> gcc version 7.1.0 (Debian 7.1.0-13)
>
> $ gcc -v
> Using built-in specs.
> COLLECT_GCC=gcc
> COLLECT_LTO_WRAPPER=/opt/gcc72/libexec/gcc/sparc64-unknown-linux-gnu/7.2.0/lto-wrapper
> Target: sparc64-unknown-linux-gnu
> Configured with: ../gcc-7.2.0/configure --prefix=/opt/gcc72
> Thread model: posix
> gcc version 7.2.0 (GCC)
>
> Machine is LDOM debian sid sparc64.
> --
> To unsubscribe from this list: send the line "unsubscribe sparclinux" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [sparc64] kernel OOPS with gcc 7.1 / 7.2
2017-08-15 18:50 [sparc64] kernel OOPS with gcc 7.1 / 7.2 Anatoly Pugachev
` (2 preceding siblings ...)
2017-08-16 0:45 ` Anthony Yznaga
@ 2017-08-16 0:51 ` David Miller
2017-08-16 4:30 ` David Miller
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: David Miller @ 2017-08-16 0:51 UTC (permalink / raw)
To: sparclinux
From: Anthony Yznaga <anthony.yznaga@oracle.com>
Date: Tue, 15 Aug 2017 17:45:12 -0700
> I compiled a kernel with gcc 7 and found that the compiler inserted a
> call to __multi3() in mq_attr_ok(). The sparc64 implementation of
> __multi3() was added by 1b4af13ff2cc specifically for gcc 7 and later,
> but it clobbers %g4 and %g5. Not sure if that was intended but it
> looks like __multi3() is not safe to call from kernel code.
Good catch, we have to redo the register allocation in that routine
to fix this.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [sparc64] kernel OOPS with gcc 7.1 / 7.2
2017-08-15 18:50 [sparc64] kernel OOPS with gcc 7.1 / 7.2 Anatoly Pugachev
` (3 preceding siblings ...)
2017-08-16 0:51 ` David Miller
@ 2017-08-16 4:30 ` David Miller
2017-08-16 8:42 ` Anatoly Pugachev
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: David Miller @ 2017-08-16 4:30 UTC (permalink / raw)
To: sparclinux
From: Anatoly Pugachev <matorola@gmail.com>
Date: Tue, 15 Aug 2017 21:50:45 +0300
> Together with Dmitry (ldv) , we've discovered that running test suite
> from strace produces kernel OOPS, when kernel is compiled with gcc 7.1
> or with gcc 7.2 , but not with gcc 6 :
Please try this patch:
diff --git a/arch/sparc/lib/multi3.S b/arch/sparc/lib/multi3.S
index d6b6c97..703127a 100644
--- a/arch/sparc/lib/multi3.S
+++ b/arch/sparc/lib/multi3.S
@@ -5,26 +5,26 @@
.align 4
ENTRY(__multi3) /* %o0 = u, %o1 = v */
mov %o1, %g1
- srl %o3, 0, %g4
- mulx %g4, %g1, %o1
+ srl %o3, 0, %o4
+ mulx %o4, %g1, %o1
srlx %g1, 0x20, %g3
- mulx %g3, %g4, %g5
- sllx %g5, 0x20, %o5
- srl %g1, 0, %g4
+ mulx %g3, %o4, %g7
+ sllx %g7, 0x20, %o5
+ srl %g1, 0, %o4
sub %o1, %o5, %o5
srlx %o5, 0x20, %o5
- addcc %g5, %o5, %g5
+ addcc %g7, %o5, %g7
srlx %o3, 0x20, %o5
- mulx %g4, %o5, %g4
+ mulx %o4, %o5, %o4
mulx %g3, %o5, %o5
sethi %hi(0x80000000), %g3
- addcc %g5, %g4, %g5
- srlx %g5, 0x20, %g5
+ addcc %g7, %o4, %g7
+ srlx %g7, 0x20, %g7
add %g3, %g3, %g3
movcc %xcc, %g0, %g3
- addcc %o5, %g5, %o5
- sllx %g4, 0x20, %g4
- add %o1, %g4, %o1
+ addcc %o5, %g7, %o5
+ sllx %o4, 0x20, %o4
+ add %o1, %o4, %o1
add %o5, %g3, %g2
mulx %g1, %o2, %g1
add %g1, %g2, %g1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [sparc64] kernel OOPS with gcc 7.1 / 7.2
2017-08-15 18:50 [sparc64] kernel OOPS with gcc 7.1 / 7.2 Anatoly Pugachev
` (4 preceding siblings ...)
2017-08-16 4:30 ` David Miller
@ 2017-08-16 8:42 ` Anatoly Pugachev
2017-08-16 12:19 ` Anatoly Pugachev
2017-08-16 16:27 ` David Miller
7 siblings, 0 replies; 9+ messages in thread
From: Anatoly Pugachev @ 2017-08-16 8:42 UTC (permalink / raw)
To: sparclinux
On Wed, Aug 16, 2017 at 7:30 AM, David Miller <davem@davemloft.net> wrote:
> From: Anatoly Pugachev <matorola@gmail.com>
> Date: Tue, 15 Aug 2017 21:50:45 +0300
>
>> Together with Dmitry (ldv) , we've discovered that running test suite
>> from strace produces kernel OOPS, when kernel is compiled with gcc 7.1
>> or with gcc 7.2 , but not with gcc 6 :
>
> Please try this patch:
Dave,
this patch fixes OOPS, thanks. Tested on ldom (gcc 7.2, git kernel +
patch, git strace).
Going to check with sun sparc v215 (sun4u), but it would take some
time to compile patched kernel...
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [sparc64] kernel OOPS with gcc 7.1 / 7.2
2017-08-15 18:50 [sparc64] kernel OOPS with gcc 7.1 / 7.2 Anatoly Pugachev
` (5 preceding siblings ...)
2017-08-16 8:42 ` Anatoly Pugachev
@ 2017-08-16 12:19 ` Anatoly Pugachev
2017-08-16 16:27 ` David Miller
7 siblings, 0 replies; 9+ messages in thread
From: Anatoly Pugachev @ 2017-08-16 12:19 UTC (permalink / raw)
To: sparclinux
On Wed, Aug 16, 2017 at 11:42 AM, Anatoly Pugachev <matorola@gmail.com> wrote:
> On Wed, Aug 16, 2017 at 7:30 AM, David Miller <davem@davemloft.net> wrote:
>> From: Anatoly Pugachev <matorola@gmail.com>
>> Date: Tue, 15 Aug 2017 21:50:45 +0300
>>
>>> Together with Dmitry (ldv) , we've discovered that running test suite
>>> from strace produces kernel OOPS, when kernel is compiled with gcc 7.1
>>> or with gcc 7.2 , but not with gcc 6 :
>>
>> Please try this patch:
>
> Dave,
>
> this patch fixes OOPS, thanks. Tested on ldom (gcc 7.2, git kernel +
> patch, git strace).
> Going to check with sun sparc v215 (sun4u), but it would take some
> time to compile patched kernel...
strace test suite run on v215 (sun4u), git kernel + patch
(4.13.0-rc5-00067-g510c8a899caf-dirty), debian sid gcc-7.1, git strace
passed without kernel OOPS.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [sparc64] kernel OOPS with gcc 7.1 / 7.2
2017-08-15 18:50 [sparc64] kernel OOPS with gcc 7.1 / 7.2 Anatoly Pugachev
` (6 preceding siblings ...)
2017-08-16 12:19 ` Anatoly Pugachev
@ 2017-08-16 16:27 ` David Miller
7 siblings, 0 replies; 9+ messages in thread
From: David Miller @ 2017-08-16 16:27 UTC (permalink / raw)
To: sparclinux
From: Anatoly Pugachev <matorola@gmail.com>
Date: Wed, 16 Aug 2017 11:42:43 +0300
> On Wed, Aug 16, 2017 at 7:30 AM, David Miller <davem@davemloft.net> wrote:
>> From: Anatoly Pugachev <matorola@gmail.com>
>> Date: Tue, 15 Aug 2017 21:50:45 +0300
>>
>>> Together with Dmitry (ldv) , we've discovered that running test suite
>>> from strace produces kernel OOPS, when kernel is compiled with gcc 7.1
>>> or with gcc 7.2 , but not with gcc 6 :
>>
>> Please try this patch:
>
> Dave,
>
> this patch fixes OOPS, thanks. Tested on ldom (gcc 7.2, git kernel +
> patch, git strace).
Thanks for testing.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2017-08-16 16:27 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-15 18:50 [sparc64] kernel OOPS with gcc 7.1 / 7.2 Anatoly Pugachev
2017-08-15 20:08 ` Sam Ravnborg
2017-08-15 20:35 ` Anatoly Pugachev
2017-08-16 0:45 ` Anthony Yznaga
2017-08-16 0:51 ` David Miller
2017-08-16 4:30 ` David Miller
2017-08-16 8:42 ` Anatoly Pugachev
2017-08-16 12:19 ` Anatoly Pugachev
2017-08-16 16:27 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.