https://github.com/torvalds/linux
Revision 9cc6d9e5daaa147a9a3e31557efcb331989e77be authored by Nathan Lynch on 29 September 2014, 18:11:36 UTC, committed by Russell King on 30 September 2014, 15:55:23 UTC
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.

Fixes: fbfb872f5f41 ARM: 8148/1: flush TLS and thumbee register state during exec

Reported-by: Joachim Eastwood <manabian@gmail.com>
Tested-by: Joachim Eastwood <manabian@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: Nathan Lynch <nathan_lynch@mentor.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
1 parent ebc7725
History
Tip revision: 9cc6d9e5daaa147a9a3e31557efcb331989e77be authored by Nathan Lynch on 29 September 2014, 18:11:36 UTC
ARM: 8178/1: fix set_tls for !CONFIG_KUSER_HELPERS
Tip revision: 9cc6d9e
File Mode Size
bridge
i2c
ttm
drmP.h -rw-r--r-- 52.0 KB
drm_agpsupport.h -rw-r--r-- 4.5 KB
drm_buffer.h -rw-r--r-- 4.5 KB
drm_cache.h -rw-r--r-- 1.5 KB
drm_core.h -rw-r--r-- 1.4 KB
drm_crtc.h -rw-r--r-- 40.5 KB
drm_crtc_helper.h -rw-r--r-- 6.6 KB
drm_dp_helper.h -rw-r--r-- 21.3 KB
drm_dp_mst_helper.h -rw-r--r-- 13.7 KB
drm_edid.h -rw-r--r-- 8.4 KB
drm_encoder_slave.h -rw-r--r-- 6.4 KB
drm_fb_cma_helper.h -rw-r--r-- 874 bytes
drm_fb_helper.h -rw-r--r-- 5.2 KB
drm_fixed.h -rw-r--r-- 3.9 KB
drm_flip_work.h -rw-r--r-- 2.7 KB
drm_gem_cma_helper.h -rw-r--r-- 1.7 KB
drm_global.h -rw-r--r-- 2.0 KB
drm_hashtab.h -rw-r--r-- 3.1 KB
drm_mem_util.h -rw-r--r-- 2.0 KB
drm_memory.h -rw-r--r-- 1.9 KB
drm_mipi_dsi.h -rw-r--r-- 4.8 KB
drm_mm.h -rw-r--r-- 10.4 KB
drm_modes.h -rw-r--r-- 8.6 KB
drm_modeset_lock.h -rw-r--r-- 3.8 KB
drm_of.h -rw-r--r-- 365 bytes
drm_os_linux.h -rw-r--r-- 2.2 KB
drm_panel.h -rw-r--r-- 4.7 KB
drm_pciids.h -rw-r--r-- 66.3 KB
drm_plane_helper.h -rw-r--r-- 2.6 KB
drm_rect.h -rw-r--r-- 5.0 KB
drm_sysfs.h -rw-r--r-- 300 bytes
drm_usb.h -rw-r--r-- 375 bytes
drm_vma_manager.h -rw-r--r-- 8.4 KB
exynos_drm.h -rw-r--r-- 2.6 KB
gma_drm.h -rw-r--r-- 1.0 KB
i915_drm.h -rw-r--r-- 3.4 KB
i915_pciids.h -rw-r--r-- 9.3 KB
i915_powerwell.h -rw-r--r-- 1.6 KB
intel-gtt.h -rw-r--r-- 860 bytes

back to top