linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* Crash on ARM: 8148/1 flush TLS and thumbee register
@ 2014-09-26 20:57 Joachim Eastwood
  2014-09-26 21:27 ` Nathan Lynch
  0 siblings, 1 reply; 6+ messages in thread
From: Joachim Eastwood @ 2014-09-26 20:57 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

My Cortex-M4 noMMU platform crashes on 3.17-rc6 with fbfb872f5f417cea4
"ARM: 8148/1: flush TLS and thumbee register state during exec".

Revering fbfb872f5f417cea4 makes it good as normal again.

The platform I am working on is a Thum only Cortex-M4 that is not upstream yet.

Boot log of crash:
[ 6.100000] clk: Not disabling unused clocks
[ 6.110000] RAMDISK: gzip image found at block 0
[ 9.590000] VFS: Mounted root (ext2 filesystem) readonly on device 1:0.
[ 9.600000] devtmpfs: mounted
[ 9.610000] Freeing unused kernel memory: 68K (281e5000 - 281f6000)
[ 9.630000]
[ 9.630000] Unhandled exception: IPSR = 00000005 LR = fffffff1
[ 9.630000]
[ 9.630000] CPU: 0 PID: 1 Comm: swapper Not tainted
3.17.0-rc6-00313-gd2205fa30aa7 #191
[ 9.630000] task: 29834000 ti: 29832000 task.ti: 29832000
[ 9.630000] PC is at flush_thread+0x2e/0x40
[ 9.630000] LR is at flush_thread+0x21/0x40
[ 9.630000] pc : [<2800954a>] lr : [<2800953d>] psr: 4100000b
[ 9.630000] sp : 29833d60 ip : 00000000 fp : 00000001
[ 9.630000] r10: 00003cf8 r9 : 29b1f000 r8 : 00000000
[ 9.630000] r7 : 29b0bc00 r6 : 29834000 r5 : 29832000 r4 : 29832000
[ 9.630000] r3 : ffff0ff0 r2 : 29832000 r1 : 00000000 r0 : 282121f0
[ 9.630000] xPSR: 4100000b
[ 9.630000] CPU: 0 PID: 1 Comm: swapper Not tainted
3.17.0-rc6-00313-gd2205fa30aa7 #191
[ 9.630000] [<2800afa5>] (unwind_backtrace) from [<2800a327>]
(show_stack+0xb/0xc)
[ 9.630000] [<2800a327>] (show_stack) from [<2800a963>]
(__invalid_entry+0x4b/0x4c)


regards,
Joachim Eastwood

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Crash on ARM: 8148/1 flush TLS and thumbee register
  2014-09-26 20:57 Crash on ARM: 8148/1 flush TLS and thumbee register Joachim Eastwood
@ 2014-09-26 21:27 ` Nathan Lynch
  2014-11-02 22:03   ` Stefan Agner
  0 siblings, 1 reply; 6+ messages in thread
From: Nathan Lynch @ 2014-09-26 21:27 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Joachim,

On 09/26/2014 03:57 PM, Joachim Eastwood wrote:
> Hi,
> 
> My Cortex-M4 noMMU platform crashes on 3.17-rc6 with fbfb872f5f417cea4
> "ARM: 8148/1: flush TLS and thumbee register state during exec".
> 
> Revering fbfb872f5f417cea4 makes it good as normal again.
> 
> The platform I am working on is a Thum only Cortex-M4 that is not upstream yet.
> 
> Boot log of crash:
> [ 6.100000] clk: Not disabling unused clocks
> [ 6.110000] RAMDISK: gzip image found at block 0
> [ 9.590000] VFS: Mounted root (ext2 filesystem) readonly on device 1:0.
> [ 9.600000] devtmpfs: mounted
> [ 9.610000] Freeing unused kernel memory: 68K (281e5000 - 281f6000)
> [ 9.630000]
> [ 9.630000] Unhandled exception: IPSR = 00000005 LR = fffffff1
> [ 9.630000]
> [ 9.630000] CPU: 0 PID: 1 Comm: swapper Not tainted
> 3.17.0-rc6-00313-gd2205fa30aa7 #191
> [ 9.630000] task: 29834000 ti: 29832000 task.ti: 29832000
> [ 9.630000] PC is at flush_thread+0x2e/0x40
> [ 9.630000] LR is at flush_thread+0x21/0x40
> [ 9.630000] pc : [<2800954a>] lr : [<2800953d>] psr: 4100000b
> [ 9.630000] sp : 29833d60 ip : 00000000 fp : 00000001
> [ 9.630000] r10: 00003cf8 r9 : 29b1f000 r8 : 00000000
> [ 9.630000] r7 : 29b0bc00 r6 : 29834000 r5 : 29832000 r4 : 29832000
> [ 9.630000] r3 : ffff0ff0 r2 : 29832000 r1 : 00000000 r0 : 282121f0
> [ 9.630000] xPSR: 4100000b
> [ 9.630000] CPU: 0 PID: 1 Comm: swapper Not tainted
> 3.17.0-rc6-00313-gd2205fa30aa7 #191
> [ 9.630000] [<2800afa5>] (unwind_backtrace) from [<2800a327>]
> (show_stack+0xb/0xc)
> [ 9.630000] [<2800a327>] (show_stack) from [<2800a963>]
> (__invalid_entry+0x4b/0x4c)

Thanks for the report -- I see r3 has ffff0ff0 so I'm guessing this is
set_tls attempting to clear the tls location in the kuser helper page,
which I suppose isn't appropriate on MMU-less ARM?

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Crash on ARM: 8148/1 flush TLS and thumbee register
  2014-09-26 21:27 ` Nathan Lynch
@ 2014-11-02 22:03   ` Stefan Agner
  2014-11-02 22:14     ` Russell King - ARM Linux
  0 siblings, 1 reply; 6+ messages in thread
From: Stefan Agner @ 2014-11-02 22:03 UTC (permalink / raw)
  To: linux-arm-kernel

Hi all,

While working on Vybrid (vf610) Cortex-M4 support I also hit this crash
observed by Joachim:

...
Freeing unused kernel memory: 16K (8800a000 - 8800e000)

Unhandled exception: IPSR = 00000005 LR = fffffff1
CPU: 0 PID: 1 Comm: swapper Not tainted 3.18.0-rc1-00041-ga30465a #216
task: 8b838000 ti: 8b82a000 task.ti: 8b82a000
PC is at flush_thread+0x32/0x40
LR is at flush_thread+0x21/0x40
pc : [<8f00157a>]    lr : [<8f001569>]    psr: 4100000b
sp : 8b82be20  ip : 00000000  fp : 8b83c000
r10: 00000001  r9 : 88018c84  r8 : 8bb85000
r7 : 8b838000  r6 : 00000000  r5 : 8bb77400  r4 : 8b82a000
r3 : ffff0ff0  r2 : 8b82a000  r1 : 00000000  r0 : 88020354
xPSR: 4100000b
CPU: 0 PID: 1 Comm: swapper Not tainted 3.18.0-rc1-00041-ga30465a #216
[<8f002bc1>] (unwind_backtrace) from [<8f002033>] (show_stack+0xb/0xc)
[<8f002033>] (show_stack) from [<8f00265b>] (__invalid_entry+0x4b/0x4c)

Can reproduce it on 3.18-rc1, as well as 3.17.

Am 2014-09-26 23:27, schrieb Nathan Lynch:
<snip>
> Thanks for the report -- I see r3 has ffff0ff0 so I'm guessing this is
> set_tls attempting to clear the tls location in the kuser helper page,
> which I suppose isn't appropriate on MMU-less ARM?

I dug a bit deeper and found out that CONFIG_KUSER_HELPERS was enabled
on my build. Without CONFIG_KUSER_HELPERS, the kernel did not crash with
this patch (which makes sense, looking the code, the crashing code is
not executed in the !CONFIG_KUSER_HELPERS case)...

However, wouldn't a "depends on MMU" be required for
CONFIG_KUSER_HELPERS anyway? As far as I understood, this maps stuff
into the user space tasks address space, which is only possible with
MMU...

Also added Uwe Kleine-K?nig as he worked on !MMU Cortex-M3 support.

--
Stefan

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Crash on ARM: 8148/1 flush TLS and thumbee register
  2014-11-02 22:03   ` Stefan Agner
@ 2014-11-02 22:14     ` Russell King - ARM Linux
  2014-11-03  7:47       ` Uwe Kleine-König
  2014-11-03 14:34       ` Nathan Lynch
  0 siblings, 2 replies; 6+ messages in thread
From: Russell King - ARM Linux @ 2014-11-02 22:14 UTC (permalink / raw)
  To: linux-arm-kernel

On Sun, Nov 02, 2014 at 11:03:14PM +0100, Stefan Agner wrote:
> Hi all,
> 
> While working on Vybrid (vf610) Cortex-M4 support I also hit this crash
> observed by Joachim:
> 
> ...
> Freeing unused kernel memory: 16K (8800a000 - 8800e000)
> 
> Unhandled exception: IPSR = 00000005 LR = fffffff1
> CPU: 0 PID: 1 Comm: swapper Not tainted 3.18.0-rc1-00041-ga30465a #216
> task: 8b838000 ti: 8b82a000 task.ti: 8b82a000
> PC is at flush_thread+0x32/0x40
> LR is at flush_thread+0x21/0x40
> pc : [<8f00157a>]    lr : [<8f001569>]    psr: 4100000b
> sp : 8b82be20  ip : 00000000  fp : 8b83c000
> r10: 00000001  r9 : 88018c84  r8 : 8bb85000
> r7 : 8b838000  r6 : 00000000  r5 : 8bb77400  r4 : 8b82a000
> r3 : ffff0ff0  r2 : 8b82a000  r1 : 00000000  r0 : 88020354
> xPSR: 4100000b
> CPU: 0 PID: 1 Comm: swapper Not tainted 3.18.0-rc1-00041-ga30465a #216
> [<8f002bc1>] (unwind_backtrace) from [<8f002033>] (show_stack+0xb/0xc)
> [<8f002033>] (show_stack) from [<8f00265b>] (__invalid_entry+0x4b/0x4c)
> 
> Can reproduce it on 3.18-rc1, as well as 3.17.

Hmm, I think KUSER_HELPERS needs to depend on MMU.  Nathan?

-- 
FTTC broadband for 0.8mile line: currently at 9.5Mbps down 400kbps up
according to speedtest.net.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Crash on ARM: 8148/1 flush TLS and thumbee register
  2014-11-02 22:14     ` Russell King - ARM Linux
@ 2014-11-03  7:47       ` Uwe Kleine-König
  2014-11-03 14:34       ` Nathan Lynch
  1 sibling, 0 replies; 6+ messages in thread
From: Uwe Kleine-König @ 2014-11-03  7:47 UTC (permalink / raw)
  To: linux-arm-kernel

On Sun, Nov 02, 2014 at 10:14:01PM +0000, Russell King - ARM Linux wrote:
> On Sun, Nov 02, 2014 at 11:03:14PM +0100, Stefan Agner wrote:
> > Hi all,
> > 
> > While working on Vybrid (vf610) Cortex-M4 support I also hit this crash
> > observed by Joachim:
> > 
> > ...
> > Freeing unused kernel memory: 16K (8800a000 - 8800e000)
> > 
> > Unhandled exception: IPSR = 00000005 LR = fffffff1
> > CPU: 0 PID: 1 Comm: swapper Not tainted 3.18.0-rc1-00041-ga30465a #216
> > task: 8b838000 ti: 8b82a000 task.ti: 8b82a000
> > PC is at flush_thread+0x32/0x40
> > LR is at flush_thread+0x21/0x40
> > pc : [<8f00157a>]    lr : [<8f001569>]    psr: 4100000b
> > sp : 8b82be20  ip : 00000000  fp : 8b83c000
> > r10: 00000001  r9 : 88018c84  r8 : 8bb85000
> > r7 : 8b838000  r6 : 00000000  r5 : 8bb77400  r4 : 8b82a000
> > r3 : ffff0ff0  r2 : 8b82a000  r1 : 00000000  r0 : 88020354
> > xPSR: 4100000b
> > CPU: 0 PID: 1 Comm: swapper Not tainted 3.18.0-rc1-00041-ga30465a #216
> > [<8f002bc1>] (unwind_backtrace) from [<8f002033>] (show_stack+0xb/0xc)
> > [<8f002033>] (show_stack) from [<8f00265b>] (__invalid_entry+0x4b/0x4c)
> > 
> > Can reproduce it on 3.18-rc1, as well as 3.17.
> 
> Hmm, I think KUSER_HELPERS needs to depend on MMU.  Nathan?
On Cortex-M3 and M4 addresses that start with 0xf....... cannot be RAM.
So as long as the address is fixed there it won't work on ARMv7-M.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-K?nig            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Crash on ARM: 8148/1 flush TLS and thumbee register
  2014-11-02 22:14     ` Russell King - ARM Linux
  2014-11-03  7:47       ` Uwe Kleine-König
@ 2014-11-03 14:34       ` Nathan Lynch
  1 sibling, 0 replies; 6+ messages in thread
From: Nathan Lynch @ 2014-11-03 14:34 UTC (permalink / raw)
  To: linux-arm-kernel

On 11/02/2014 04:14 PM, Russell King - ARM Linux wrote:
> On Sun, Nov 02, 2014 at 11:03:14PM +0100, Stefan Agner wrote:
>> Hi all,
>>
>> While working on Vybrid (vf610) Cortex-M4 support I also hit this crash
>> observed by Joachim:
>>
>> ...
>> Freeing unused kernel memory: 16K (8800a000 - 8800e000)
>>
>> Unhandled exception: IPSR = 00000005 LR = fffffff1
>> CPU: 0 PID: 1 Comm: swapper Not tainted 3.18.0-rc1-00041-ga30465a #216
>> task: 8b838000 ti: 8b82a000 task.ti: 8b82a000
>> PC is at flush_thread+0x32/0x40
>> LR is at flush_thread+0x21/0x40
>> pc : [<8f00157a>]    lr : [<8f001569>]    psr: 4100000b
>> sp : 8b82be20  ip : 00000000  fp : 8b83c000
>> r10: 00000001  r9 : 88018c84  r8 : 8bb85000
>> r7 : 8b838000  r6 : 00000000  r5 : 8bb77400  r4 : 8b82a000
>> r3 : ffff0ff0  r2 : 8b82a000  r1 : 00000000  r0 : 88020354
>> xPSR: 4100000b
>> CPU: 0 PID: 1 Comm: swapper Not tainted 3.18.0-rc1-00041-ga30465a #216
>> [<8f002bc1>] (unwind_backtrace) from [<8f002033>] (show_stack+0xb/0xc)
>> [<8f002033>] (show_stack) from [<8f00265b>] (__invalid_entry+0x4b/0x4c)
>>
>> Can reproduce it on 3.18-rc1, as well as 3.17.
> 
> Hmm, I think KUSER_HELPERS needs to depend on MMU.  Nathan?

Yes.  I'll send a patch today.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-11-03 14:34 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-26 20:57 Crash on ARM: 8148/1 flush TLS and thumbee register Joachim Eastwood
2014-09-26 21:27 ` Nathan Lynch
2014-11-02 22:03   ` Stefan Agner
2014-11-02 22:14     ` Russell King - ARM Linux
2014-11-03  7:47       ` Uwe Kleine-König
2014-11-03 14:34       ` Nathan Lynch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).