From: Greg Kroah-Hartman Date: Tue, 18 Nov 2014 19:21:08 +0000 (-0800) Subject: 3.10-stable patches X-Git-Tag: v3.10.61~36 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=605b07c6cd0ec3a48595bf3a6cb83c9afb215649;p=thirdparty%2Fkernel%2Fstable-queue.git 3.10-stable patches added patches: arm-8198-1-make-kuser-helpers-depend-on-mmu.patch --- diff --git a/queue-3.10/arm-8198-1-make-kuser-helpers-depend-on-mmu.patch b/queue-3.10/arm-8198-1-make-kuser-helpers-depend-on-mmu.patch new file mode 100644 index 00000000000..5a22b167d48 --- /dev/null +++ b/queue-3.10/arm-8198-1-make-kuser-helpers-depend-on-mmu.patch @@ -0,0 +1,64 @@ +From 08b964ff3c51b10aaf2e6ba639f40054c09f0f7a Mon Sep 17 00:00:00 2001 +From: Nathan Lynch +Date: Mon, 10 Nov 2014 23:46:27 +0100 +Subject: ARM: 8198/1: make kuser helpers depend on MMU +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Nathan Lynch + +commit 08b964ff3c51b10aaf2e6ba639f40054c09f0f7a upstream. + +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) + +Signed-off-by: Nathan Lynch +Reported-by: Stefan Agner +Acked-by: Uwe Kleine-König +Signed-off-by: Russell King +Signed-off-by: Greg Kroah-Hartman + +--- + arch/arm/mm/Kconfig | 1 + + 1 file changed, 1 insertion(+) + +--- a/arch/arm/mm/Kconfig ++++ b/arch/arm/mm/Kconfig +@@ -778,6 +778,7 @@ config NEED_KUSER_HELPERS + + config KUSER_HELPERS + bool "Enable kuser helpers in vector page" if !NEED_KUSER_HELPERS ++ depends on MMU + default y + help + Warning: disabling this option may break user programs. diff --git a/queue-3.10/series b/queue-3.10/series index 2d2dd6621b4..48f344a312d 100644 --- a/queue-3.10/series +++ b/queue-3.10/series @@ -21,3 +21,4 @@ iwlwifi-configure-the-ltr.patch macvtap-fix-csum_start-when-vlan-tags-are-present.patch mac80211-fix-use-after-free-in-defragmentation.patch drm-radeon-add-missing-crtc-unlock-when-setting-up-the-mc.patch +arm-8198-1-make-kuser-helpers-depend-on-mmu.patch