linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: u.kleine-koenig@pengutronix.de (Uwe Kleine-König)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: make kuser helpers depend on MMU
Date: Tue, 4 Nov 2014 09:03:53 +0100	[thread overview]
Message-ID: <20141104080353.GX8316@pengutronix.de> (raw)
In-Reply-To: <1415045178-4673-1-git-send-email-nathan_lynch@mentor.com>

On Mon, Nov 03, 2014 at 02:06:18PM -0600, Nathan Lynch wrote:
> The kuser helpers page is not set up on non-MMU systems, so it does
> not make sense to allow CONFIG_KUSER_HELPERS to be enabled when
> CONFIG_MMU=n.  Allowing it to be set on !MMU results in an oops in
> set_tls (used in execve and the arm_syscall trap handler):
> 
> 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)
> 
> As best I can tell this issue existed for the set_tls ARM syscall
> before commit fbfb872f5f41 "ARM: 8148/1: flush TLS and thumbee
> register state during exec" consolidated the TLS manipulation code
> into the set_tls helper function, but now that we're using it to flush
> register state during execve, !MMU users encounter the oops at the
> first exec.
> 
> Prevent CONFIG_MMU=n configurations from enabling
> CONFIG_KUSER_HELPERS.
> 
> Fixes: fbfb872f5f41 ARM: 8148/1: flush TLS and thumbee register state during exec
minor nit: Usual syntax here is:

	Fixes: fbfb872f5f41 ("ARM: 8148/1: flush ...")

> 
and it's part of the s-o-b area, so no empty line

> Signed-off-by: Nathan Lynch <nathan_lynch@mentor.com>
> Reported-by: Stefan Agner <stefan@agner.ch>
Acked-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>

Thanks
Uwe

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

  reply	other threads:[~2014-11-04  8:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-03 20:06 [PATCH] ARM: make kuser helpers depend on MMU Nathan Lynch
2014-11-04  8:03 ` Uwe Kleine-König [this message]
2014-11-04 17:23   ` Nathan Lynch

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=20141104080353.GX8316@pengutronix.de \
    --to=u.kleine-koenig@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).