public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: will.deacon@arm•com (Will Deacon)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH] ARM: fix set_tls for !CONFIG_KUSER_HELPERS
Date: Mon, 29 Sep 2014 10:03:13 +0100	[thread overview]
Message-ID: <20140929090313.GA20303@arm.com> (raw)
In-Reply-To: <CAGhQ9VzRRAj76VU19DoBZNP4HAKrEoTNmXEswkUtL00gjSyqCQ@mail.gmail.com>

On Sat, Sep 27, 2014 at 11:30:26AM +0100, Joachim Eastwood wrote:
> On 27 September 2014 01:46, Nathan Lynch <nathan_lynch@mentor•com> wrote:
> > Joachim Eastwood reports that commit fbfb872f5f41 "ARM: 8148/1: flush
> > TLS and thumbee register state during exec" causes a boot-time crash
> > on a Cortex-M4 nommu system:
> >
> > Freeing unused kernel memory: 68K (281e5000 - 281f6000)
> > Unhandled exception: IPSR = 00000005 LR = fffffff1
> > CPU: 0 PID: 1 Comm: swapper Not tainted 3.17.0-rc6-00313-gd2205fa30aa7 #191
> > task: 29834000 ti: 29832000 task.ti: 29832000
> > PC is at flush_thread+0x2e/0x40
> > LR is at flush_thread+0x21/0x40
> > pc : [<2800954a>] lr : [<2800953d>] psr: 4100000b
> > sp : 29833d60 ip : 00000000 fp : 00000001
> > r10: 00003cf8 r9 : 29b1f000 r8 : 00000000
> > r7 : 29b0bc00 r6 : 29834000 r5 : 29832000 r4 : 29832000
> > r3 : ffff0ff0 r2 : 29832000 r1 : 00000000 r0 : 282121f0
> > xPSR: 4100000b
> > CPU: 0 PID: 1 Comm: swapper Not tainted 3.17.0-rc6-00313-gd2205fa30aa7 #191
> > [<2800afa5>] (unwind_backtrace) from [<2800a327>] (show_stack+0xb/0xc)
> > [<2800a327>] (show_stack) from [<2800a963>] (__invalid_entry+0x4b/0x4c)
> >
> > The problem is that set_tls is attempting to clear the TLS location in
> > the kernel-user helper page, which isn't set up on V7M.
> >
> > Fix this by guarding the write to the kuser helper page with
> > a CONFIG_KUSER_HELPERS ifdef.
> >
> > Reported-by: Joachim Eastwood <manabian@gmail•com>
> > Fixes: fbfb872f5f41 ARM: 8148/1: flush TLS and thumbee register state during exec
> > Cc: stable at vger.kernel.org
> > Signed-off-by: Nathan Lynch <nathan_lynch@mentor•com>
> > ---
> 
> Works for me.
> 
> Tested-by: Joachim Eastwood <manabian@gmail•com>

Out of interest, which M4 board are you using to run Linux? Are they
generally available?

Will

  reply	other threads:[~2014-09-29  9:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-26 23:46 [PATCH] ARM: fix set_tls for !CONFIG_KUSER_HELPERS Nathan Lynch
2014-09-27 10:30 ` Joachim Eastwood
2014-09-29  9:03   ` Will Deacon [this message]
2014-09-29 10:15     ` Joachim Eastwood

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140929090313.GA20303@arm.com \
    --to=will.deacon@arm$(echo .)com \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox