Crash in -next due to 'MIPS: Move FP usage checks into protected_{save, restore}_fp_context'
Subsystems (2)
Hi,
my qemu test for mipsel crashes with next-20150715 as follows.
...
Btrfs loaded
console [netcon0] enabled
netconsole: network logging started
Freeing unused kernel memory: 284K (808f9000 - 80940000)
Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000008
Bisect points to commit 'MIPS: Move FP usage checks into protected_{save, restore}_fp_context'. Bisect log is as follows.
The problem is not seen with bit endian qemu test.
Please let me know if there is anything I can do to help debugging this problem.
Thanks,
Guenter
---
# bad: [f4d61b2d73c1e4964ad68df238af5005485469af] Add linux-next specific files for 20150715
# good: [bc0195aad0daa2ad5b0d76cce22b167bc3435590] Linux 4.2-rc2
git bisect start 'HEAD' 'v4.2-rc2'
# bad: [897f492ee766d354b949f3838cbfda8978cfd3cd] Merge remote-tracking branch 'crypto/master'
git bisect bad 897f492ee766d354b949f3838cbfda8978cfd3cd
# bad: [687fe9993e4fbe728113086eb9525360465694e6] Merge remote-tracking branch 'mips/mips-for-linux-next' git bisect bad 687fe9993e4fbe728113086eb9525360465694e6
# good: [a06e5ae4e8d6d5846809e94d0d45afcc5a9eaf35] Merge remote-tracking branch 'omap/for-next'
git bisect good a06e5ae4e8d6d5846809e94d0d45afcc5a9eaf35
# good: [badbfaedef0876d3cffb3264512aaec8cc162c61] Merge remote-tracking branch 'tegra/for-next' git bisect good badbfaedef0876d3cffb3264512aaec8cc162c61
# bad: [88841d986cebe1207a47cd7422f5069b2616b194] MIPS: Advertise MSA support via HWCAP when present git bisect bad 88841d986cebe1207a47cd7422f5069b2616b194
# good: [7c1f7b83170bc14a3e461a9b5595fcecf857da70] MIPS: octeon: Replace the homebrewn flow handler git bisect good 7c1f7b83170bc14a3e461a9b5595fcecf857da70
# good: [186a699fdf6f0866ca980bcf5e79f54922fe52c2] MIPS: Introduce accessors for MSA vector registers git bisect good 186a699fdf6f0866ca980bcf5e79f54922fe52c2
# bad: [1793cdaa84ed5c4025a36793f350b07b49555b57] MIPS: Skip odd double FP registers when copying FP32 sigcontext git bisect bad 1793cdaa84ed5c4025a36793f350b07b49555b57
# good: [8a6bb0ab74eaca5f2a4e60f94df2ea5b08cdfd63] MIPS: Simplify EVA FP context handling code
git bisect good 8a6bb0ab74eaca5f2a4e60f94df2ea5b08cdfd63
# good: [6f47ebd751531249fe0e2b4d3afdfcbf9f66dbd8] MIPS: Use struct mips_abi offsets to save FP context git bisect good 6f47ebd751531249fe0e2b4d3afdfcbf9f66dbd8
# bad: [fa3156ca734cb65f23df0f844433e75ea1da37f3] MIPS: Move FP usage checks into protected_{save, restore}_fp_context git bisect bad fa3156ca734cb65f23df0f844433e75ea1da37f3
# first bad commit: [fa3156ca734cb65f23df0f844433e75ea1da37f3] MIPS: Move FP usage checks into protected_{save, restore}_fp_contextQuoted 4 lines · Guenter Roeck
Hi,
my qemu test for mipsel crashes with next-20150715 as follows.
ping ... problem is still seen as of next-20150727.
Quoted 45 lines
...
Btrfs loaded
console [netcon0] enabled
netconsole: network logging started
Freeing unused kernel memory: 284K (808f9000- 80940000)Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000008Bisect points to commit 'MIPS: Move FP usage checks into protected_{save, restore}_fp_context'. Bisect log is as follows.
The problem is not seen with bit endian qemu test.
Please let me know if there is anything I can do to help debugging this problem.
Thanks,
Guenter
---# bad: [
f4d61b2d73c1e4964ad68df238af5005485469af] Add linux-next specific files for 20150715
# good: [bc0195aad0daa2ad5b0d76cce22b167bc3435590] Linux 4.2-rc2
git bisect start 'HEAD' 'v4.2-rc2'
# bad: [897f492ee766d354b949f3838cbfda8978cfd3cd] Merge remote-tracking branch 'crypto/master'
git bisect bad897f492ee766d354b949f3838cbfda8978cfd3cd
# bad: [687fe9993e4fbe728113086eb9525360465694e6] Merge remote-tracking branch 'mips/mips-for-linux-next' git bisect bad687fe9993e4fbe728113086eb9525360465694e6
# good: [a06e5ae4e8d6d5846809e94d0d45afcc5a9eaf35] Merge remote-tracking branch 'omap/for-next'
git bisect gooda06e5ae4e8d6d5846809e94d0d45afcc5a9eaf35
# good: [badbfaedef0876d3cffb3264512aaec8cc162c61] Merge remote-tracking branch 'tegra/for-next' git bisect goodbadbfaedef0876d3cffb3264512aaec8cc162c61
# bad: [88841d986cebe1207a47cd7422f5069b2616b194] MIPS: Advertise MSA support via HWCAP when present git bisect bad88841d986cebe1207a47cd7422f5069b2616b194
# good: [7c1f7b83170bc14a3e461a9b5595fcecf857da70] MIPS: octeon: Replace the homebrewn flow handler git bisect good7c1f7b83170bc14a3e461a9b5595fcecf857da70
# good: [186a699fdf6f0866ca980bcf5e79f54922fe52c2] MIPS: Introduce accessors for MSA vector registers git bisect good186a699fdf6f0866ca980bcf5e79f54922fe52c2
# bad: [1793cdaa84ed5c4025a36793f350b07b49555b57] MIPS: Skip odd double FP registers when copying FP32 sigcontext git bisect bad1793cdaa84ed5c4025a36793f350b07b49555b57
# good: [8a6bb0ab74eaca5f2a4e60f94df2ea5b08cdfd63] MIPS: Simplify EVA FP context handling code
git bisect good8a6bb0ab74eaca5f2a4e60f94df2ea5b08cdfd63
# good: [6f47ebd751531249fe0e2b4d3afdfcbf9f66dbd8] MIPS: Use structmips_abioffsets to save FP context git bisect good6f47ebd751531249fe0e2b4d3afdfcbf9f66dbd8
# bad: [fa3156ca734cb65f23df0f844433e75ea1da37f3] MIPS: Move FP usage checks into protected_{save, restore}_fp_context git bisect badfa3156ca734cb65f23df0f844433e75ea1da37f3# first bad commit: [fa3156ca734cb65f23df0f844433e75ea1da37f3] MIPS: Move FP usage checks into protected_{save, restore}_fp_context
Quoted 6 lines · Guenter Roeck
Quoted 4 lines · Guenter Roeck
Hi,
my qemu test for mipsel crashes with next-20150715 as follows.
ping ... problem is still seen as of next-20150727.
Hi Guenter,
Apologies for the delay. Could you share your affected kernel configuration & which userland you're running?
I've just tested with a malta_defconfig kernel & a buildroot based initramfs without problems, and things are also fine on my physical MIPSr6 setups. If you have any directions with which I can reproduce this problem that would be great.
Thanks,
Paul
Quoted 46 lines
Quoted 46 lines
...
Btrfs loaded
console [netcon0] enabled
netconsole: network logging started
Freeing unused kernel memory: 284K (808f9000- 80940000)Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000008Bisect points to commit 'MIPS: Move FP usage checks into protected_{save, restore}_fp_context'. Bisect log is as follows.
The problem is not seen with bit endian qemu test.
Please let me know if there is anything I can do to help debugging this problem.
Thanks,
Guenter
---# bad: [
f4d61b2d73c1e4964ad68df238af5005485469af] Add linux-next specific files for 20150715
# good: [bc0195aad0daa2ad5b0d76cce22b167bc3435590] Linux 4.2-rc2
git bisect start 'HEAD' 'v4.2-rc2'
# bad: [897f492ee766d354b949f3838cbfda8978cfd3cd] Merge remote-tracking branch 'crypto/master'
git bisect bad897f492ee766d354b949f3838cbfda8978cfd3cd
# bad: [687fe9993e4fbe728113086eb9525360465694e6] Merge remote-tracking branch 'mips/mips-for-linux-next' git bisect bad687fe9993e4fbe728113086eb9525360465694e6
# good: [a06e5ae4e8d6d5846809e94d0d45afcc5a9eaf35] Merge remote-tracking branch 'omap/for-next'
git bisect gooda06e5ae4e8d6d5846809e94d0d45afcc5a9eaf35
# good: [badbfaedef0876d3cffb3264512aaec8cc162c61] Merge remote-tracking branch 'tegra/for-next' git bisect goodbadbfaedef0876d3cffb3264512aaec8cc162c61
# bad: [88841d986cebe1207a47cd7422f5069b2616b194] MIPS: Advertise MSA support via HWCAP when present git bisect bad88841d986cebe1207a47cd7422f5069b2616b194
# good: [7c1f7b83170bc14a3e461a9b5595fcecf857da70] MIPS: octeon: Replace the homebrewn flow handler git bisect good7c1f7b83170bc14a3e461a9b5595fcecf857da70
# good: [186a699fdf6f0866ca980bcf5e79f54922fe52c2] MIPS: Introduce accessors for MSA vector registers git bisect good186a699fdf6f0866ca980bcf5e79f54922fe52c2
# bad: [1793cdaa84ed5c4025a36793f350b07b49555b57] MIPS: Skip odd double FP registers when copying FP32 sigcontext git bisect bad1793cdaa84ed5c4025a36793f350b07b49555b57
# good: [8a6bb0ab74eaca5f2a4e60f94df2ea5b08cdfd63] MIPS: Simplify EVA FP context handling code
git bisect good8a6bb0ab74eaca5f2a4e60f94df2ea5b08cdfd63
# good: [6f47ebd751531249fe0e2b4d3afdfcbf9f66dbd8] MIPS: Use structmips_abioffsets to save FP context git bisect good6f47ebd751531249fe0e2b4d3afdfcbf9f66dbd8
# bad: [fa3156ca734cb65f23df0f844433e75ea1da37f3] MIPS: Move FP usage checks into protected_{save, restore}_fp_context git bisect badfa3156ca734cb65f23df0f844433e75ea1da37f3# first bad commit: [fa3156ca734cb65f23df0f844433e75ea1da37f3] MIPS: Move FP usage checks into protected_{save, restore}_fp_context
Quoted 10 lines · Paul Burton
Quoted 6 lines · Guenter Roeck
Quoted 4 lines · Guenter Roeck
Hi,
my qemu test for mipsel crashes with next-20150715 as follows.
ping ... problem is still seen as of next-20150727.
Hi Guenter,
Quoted 8 lines
Apologies for the delay. Could you share your affected kernel configuration & which userland you're running?
I've just tested with a
malta_defconfigkernel & a buildroot based initramfs without problems, and things are also fine on my physical MIPSr6 setups. If you have any directions with which I can reproduce this problem that would be great.
This is with qemu in little endian mode. Big endian works fine. The configuration, the script to build and run the kernel, and the root file system used are are available at
https://github.com/groeck/linux-build-test, in directory rootfs/mipsel/. The log for the latest build failure is in
http://server.roeck-us.net:8010/builders/qemu-mipsel-next/builds/194/steps/qemubuildcommand/logs/stdio.
Hope this helps,
Guenter
Quoted 49 lines
Thanks,
PaulQuoted 46 lines
Quoted 46 lines
...
Btrfs loaded
console [netcon0] enabled
netconsole: network logging started
Freeing unused kernel memory: 284K (808f9000- 80940000)Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000008Bisect points to commit 'MIPS: Move FP usage checks into protected_{save, restore}_fp_context'. Bisect log is as follows.
The problem is not seen with bit endian qemu test.
Please let me know if there is anything I can do to help debugging this problem.
Thanks,
Guenter
---# bad: [
f4d61b2d73c1e4964ad68df238af5005485469af] Add linux-next specific files for 20150715
# good: [bc0195aad0daa2ad5b0d76cce22b167bc3435590] Linux 4.2-rc2
git bisect start 'HEAD' 'v4.2-rc2'
# bad: [897f492ee766d354b949f3838cbfda8978cfd3cd] Merge remote-tracking branch 'crypto/master'
git bisect bad897f492ee766d354b949f3838cbfda8978cfd3cd
# bad: [687fe9993e4fbe728113086eb9525360465694e6] Merge remote-tracking branch 'mips/mips-for-linux-next' git bisect bad687fe9993e4fbe728113086eb9525360465694e6
# good: [a06e5ae4e8d6d5846809e94d0d45afcc5a9eaf35] Merge remote-tracking branch 'omap/for-next'
git bisect gooda06e5ae4e8d6d5846809e94d0d45afcc5a9eaf35
# good: [badbfaedef0876d3cffb3264512aaec8cc162c61] Merge remote-tracking branch 'tegra/for-next' git bisect goodbadbfaedef0876d3cffb3264512aaec8cc162c61
# bad: [88841d986cebe1207a47cd7422f5069b2616b194] MIPS: Advertise MSA support via HWCAP when present git bisect bad88841d986cebe1207a47cd7422f5069b2616b194
# good: [7c1f7b83170bc14a3e461a9b5595fcecf857da70] MIPS: octeon: Replace the homebrewn flow handler git bisect good7c1f7b83170bc14a3e461a9b5595fcecf857da70
# good: [186a699fdf6f0866ca980bcf5e79f54922fe52c2] MIPS: Introduce accessors for MSA vector registers git bisect good186a699fdf6f0866ca980bcf5e79f54922fe52c2
# bad: [1793cdaa84ed5c4025a36793f350b07b49555b57] MIPS: Skip odd double FP registers when copying FP32 sigcontext git bisect bad1793cdaa84ed5c4025a36793f350b07b49555b57
# good: [8a6bb0ab74eaca5f2a4e60f94df2ea5b08cdfd63] MIPS: Simplify EVA FP context handling code
git bisect good8a6bb0ab74eaca5f2a4e60f94df2ea5b08cdfd63
# good: [6f47ebd751531249fe0e2b4d3afdfcbf9f66dbd8] MIPS: Use structmips_abioffsets to save FP context git bisect good6f47ebd751531249fe0e2b4d3afdfcbf9f66dbd8
# bad: [fa3156ca734cb65f23df0f844433e75ea1da37f3] MIPS: Move FP usage checks into protected_{save, restore}_fp_context git bisect badfa3156ca734cb65f23df0f844433e75ea1da37f3# first bad commit: [fa3156ca734cb65f23df0f844433e75ea1da37f3] MIPS: Move FP usage checks into protected_{save, restore}_fp_context
Quoted 14 lines · Guenter Roeck
Quoted 13 lines · Paul Burton
Quoted 6 lines · Guenter Roeck
Quoted 4 lines · Guenter Roeck
Hi,
my qemu test for mipsel crashes with next-20150715 as follows.
ping ... problem is still seen as of next-20150727.
Hi Guenter,
Apologies for the delay. Could you share your affected kernel configuration & which userland you're running?
Quoted 6 lines
Quoted 5 lines
I've just tested with a
malta_defconfigkernel & a buildroot based initramfs without problems, and things are also fine on my physical MIPSr6 setups. If you have any directions with which I can reproduce this problem that would be great.This is with qemu in little endian mode. Big endian works fine.
Yup, I was using little endian in both cases. malta_defconfig is little endian - sadly use of the el suffix is pretty inconsistent...
Quoted 5 lines
The configuration, the script to build and run the kernel, and the root file system used are are available at
https://github.com/groeck/linux-build-test, in directory rootfs/mipsel/. The log for the latest build failure is in
http://server.roeck-us.net:8010/builders/qemu-mipsel-next/builds/194/steps/qemubuildcommand/logs/stdio.
Thanks for the pointers, I'm able to reproduce it using your config and initramfs, and I'll dig into what's going on here.
Paul
Quoted 20 lines · Paul Burton
Quoted 19 lines · Guenter Roeck
Quoted 18 lines · Paul Burton
Quoted 6 lines · Guenter Roeck
Quoted 4 lines · Guenter Roeck
Hi,
my qemu test for mipsel crashes with next-20150715 as follows.
ping ... problem is still seen as of next-20150727.
Hi Guenter,
Apologies for the delay. Could you share your affected kernel configuration & which userland you're running?
I've just tested with a
malta_defconfigkernel & a buildroot based initramfs without problems, and things are also fine on my physical MIPSr6 setups. If you have any directions with which I can reproduce this problem that would be great.
Quoted 5 lines
Quoted 1 line
This is with qemu in little endian mode. Big endian works fine.
Yup, I was using little endian in both cases.
malta_defconfigis little endian - sadly use of the el suffix is pretty inconsistent...
Interesting.
Quoted 9 lines
Quoted 5 lines
The configuration, the script to build and run the kernel, and the root file system used are are available at
https://github.com/groeck/linux-build-test, in directory rootfs/mipsel/. The log for the latest build failure is in
http://server.roeck-us.net:8010/builders/qemu-mipsel-next/builds/194/steps/qemubuildcommand/logs/stdio.Thanks for the pointers, I'm able to reproduce it using your config and initramfs, and I'll dig into what's going on here.
Let me know what you find. Maybe something is wrong with my configuration or initramfs, but it is odd that I didn't see the problem earlier.
Unfortunately I don't recall where I got the configuration from. Guess I should keep notes :-(.
Thanks,
Guenter
Quoted 20 lines · Paul Burton
Quoted 19 lines · Guenter Roeck
Quoted 18 lines · Paul Burton
Quoted 6 lines · Guenter Roeck
Quoted 4 lines · Guenter Roeck
Hi,
my qemu test for mipsel crashes with next-20150715 as follows.
ping ... problem is still seen as of next-20150727.
Hi Guenter,
Apologies for the delay. Could you share your affected kernel configuration & which userland you're running?
I've just tested with a
malta_defconfigkernel & a buildroot based initramfs without problems, and things are also fine on my physical MIPSr6 setups. If you have any directions with which I can reproduce this problem that would be great.
Quoted 5 lines
Quoted 1 line
This is with qemu in little endian mode. Big endian works fine.
Yup, I was using little endian in both cases.
malta_defconfigis little endian - sadly use of the el suffix is pretty inconsistent...
Hi Paul,
some more data:
I tried with mipsel64, using malta_defconfig from 4.2-rc4 as starting point. Same failure. All releases from 3.2 up to 4.2-rc4 pass the test, linux-next as of today fails.
Here is the log:
I pushed the initramfs, configuration, and test script into rootfs/mipsel64 of https://github.com/groeck/linux-build-test.
Guenter
Quoted 35 lines · Guenter Roeck
Quoted 20 lines · Paul Burton
Quoted 19 lines · Guenter Roeck
Quoted 18 lines · Paul Burton
Quoted 6 lines · Guenter Roeck
Quoted 4 lines · Guenter Roeck
Hi,
my qemu test for mipsel crashes with next-20150715 as follows.
ping ... problem is still seen as of next-20150727.
Hi Guenter,
Apologies for the delay. Could you share your affected kernel configuration & which userland you're running?
I've just tested with a
malta_defconfigkernel & a buildroot based initramfs without problems, and things are also fine on my physical MIPSr6 setups. If you have any directions with which I can reproduce this problem that would be great.Quoted 5 lines
Quoted 1 line
This is with qemu in little endian mode. Big endian works fine.
Yup, I was using little endian in both cases.
malta_defconfigis little endian - sadly use of the el suffix is pretty inconsistent...Hi Paul,
some more data:
I tried with mipsel64, using
malta_defconfigfrom 4.2-rc4 as starting point. Same failure. All releases from 3.2 up to 4.2-rc4 pass the test, linux-next as of today fails.
Quoted 6 lines
Here is the log:
I pushed the initramfs, configuration, and test script into rootfs/mipsel64 of https://github.com/groeck/linux-build-test.
Hi Guenter,
I'm currently mailing out v2 of the series which should fix your problem. It was an issue where the kernel would check the FP context for whether a SIGFPE should be generated even in cases where FP had not been used by userland, and thus had not been initialised. My userland is hard float & thus makes use of the FPU early whilst I believe yours is soft float, which explains the difference in behaviour.
I think the endian difference probably boils down to what garbage the initial FP context contained.
Ralf: can you update the patches in -next please?
Thanks,
Paul
Hi Paul,
Quoted 10 lines · Paul Burton
Hi Guenter,
I'm currently mailing out v2 of the series which should fix your problem. It was an issue where the kernel would check the FP context for whether a SIGFPE should be generated even in cases where FP had not been used by userland, and thus had not been initialised. My userland is hard float & thus makes use of the FPU early whilst I believe yours is soft float, which explains the difference in behaviour.
Quoted 3 lines
I think the endian difference probably boils down to what garbage the initial FP context contained.
Thanks a lot for the fix!
Guenter
Quoted 1 line · Paul Burton
Ralf: can you update the patches in -next please?
Done. Will push in a few minutes to upstream-sfr; should make it to -next by tomorrow.
But <rant> could you next time please send a patchset based on something halfway recent? Five patches had merge conflicts, one is already upstream. </rant>.
Ralf