linux/arch/arm
Russell King 274e91b81e ARM: alignment: fix alignment handling for uaccess changes
Jonathan Liu reports that the recent addition of CPU_SW_DOMAIN_PAN
causes wpa_supplicant to die due to the following kernel oops:

Unhandled fault: page domain fault (0x81b) at 0x001017a2
pgd = ee1b8000
[001017a2] *pgd=6ebee831, *pte=6c35475f, *ppte=6c354c7f
Internal error: : 81b [#1] SMP ARM
Modules linked in: rt2800usb rt2x00usb rt2800librt2x00lib crc_ccitt mac80211
CPU: 1 PID: 202 Comm: wpa_supplicant Not tainted 4.3.0-rc2 #1
Hardware name: Allwinner sun7i (A20) Family
task: ec872f80 ti: ee364000 task.ti: ee364000
PC is at do_alignment_ldmstm+0x1d4/0x238
LR is at 0x0
pc : [<c001d1d8>]    lr : [<00000000>]    psr: 600c0113
sp : ee365e18  ip : 00000000  fp : 00000002
r10: 001017a2  r9 : 00000002  r8 : 001017aa
r7 : ee365fb0  r6 : e8820018  r5 : 001017a2  r4 : 00000003
r3 : d49e30e0  r2 : 00000000  r1 : ee365fbc  r0 : 00000000
Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment none[   34.393106] Control: 10c5387d  Table: 6e1b806a  DAC: 00000051
Process wpa_supplicant (pid: 202, stack limit = 0xee364210)
Stack: (0xee365e18 to 0xee366000)
...
[<c001d1d8>] (do_alignment_ldmstm) from [<c001d510>] (do_alignment+0x1f0/0x904)
[<c001d510>] (do_alignment) from [<c00092a0>] (do_DataAbort+0x38/0xb4)
[<c00092a0>] (do_DataAbort) from [<c0013d7c>] (__dabt_usr+0x3c/0x40)
Exception stack(0xee365fb0 to 0xee365ff8)
5fa0:                                     00000000 56c728c0 001017a2 d49e30e0
5fc0: 775448d2 597d4e74 00200800 7a9e1625 00802001 00000021 b6deec84 00000100
5fe0: 08020200 be9f4f20 0c0b0d0a b6d9b3e0 600c0010 ffffffff
Code: e1a0a005 e1a0000c 1affffe8 e5913000 (e4ea3001)
---[ end trace 0acd3882fcfdf9dd ]---

This is caused by the alignment handler not being fixed up for the
uaccess changes, and userspace issuing an unaligned LDM instruction.
So, fix the problem by adding the necessary fixups.

Reported-by: Jonathan Liu <net147@gmail.com>
Tested-by: Jonathan Liu <net147@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2015-09-24 11:07:00 +01:00
..
boot Merge branch 'akpm' (patches from Andrew) 2015-09-10 18:19:42 -07:00
common genirq: Remove irq argument from irq flow handlers 2015-09-16 15:47:51 +02:00
configs ARM: SoC: late fixes and dependencies 2015-09-10 17:59:04 -07:00
crypto
firmware
include ARM: wire up new syscalls 2015-09-22 08:13:42 +01:00
kernel ARM: wire up new syscalls 2015-09-22 08:13:42 +01:00
kvm arm/arm64: KVM: Remove 'config KVM_ARM_MAX_VCPUS' 2015-09-17 13:13:27 +01:00
lib Merge branch 'uaccess' into fixes 2015-09-11 19:18:28 +01:00
mach-alpine
mach-asm9260
mach-at91 genalloc: add name arg to gen_pool_get() and devm_gen_pool_create() 2015-09-04 16:54:41 -07:00
mach-axxia
mach-bcm ARM: SoC platform updates for v4.3 2015-09-01 12:18:40 -07:00
mach-berlin
mach-clps711x libnvdimm for 4.3: 2015-09-08 14:35:59 -07:00
mach-cns3xxx
mach-davinci ARM: SoC platform updates for v4.3 2015-09-01 12:18:40 -07:00
mach-digicolor
mach-dove genirq: Remove irq argument from irq flow handlers 2015-09-16 15:47:51 +02:00
mach-ebsa110
mach-efm32
mach-ep93xx ARM/fb: ep93xx: switch framebuffer to use modedb only 2015-08-13 12:25:44 +02:00
mach-exynos ARM: SoC: late fixes and dependencies 2015-09-10 17:59:04 -07:00
mach-footbridge genirq: Remove irq argument from irq flow handlers 2015-09-16 15:47:51 +02:00
mach-gemini genirq: Remove irq argument from irq flow handlers 2015-09-16 15:47:51 +02:00
mach-highbank
mach-hisi
mach-imx genirq: Remove irq argument from irq flow handlers 2015-09-16 15:47:51 +02:00
mach-integrator
mach-iop13xx genirq: Remove irq argument from irq flow handlers 2015-09-16 15:47:51 +02:00
mach-iop32x
mach-iop33x
mach-ixp4xx
mach-keystone
mach-ks8695
mach-lpc18xx
mach-lpc32xx genirq: Remove irq argument from irq flow handlers 2015-09-16 15:47:51 +02:00
mach-mediatek
mach-meson
mach-mmp ARM: mmp: remove unused RTC register definitions 2015-09-05 19:37:17 +02:00
mach-moxart
mach-mv78xx0
mach-mvebu ARM: SoC driver updates for v4.3 2015-09-01 13:00:04 -07:00
mach-mxs
mach-netx genirq: Remove irq argument from irq flow handlers 2015-09-16 15:47:51 +02:00
mach-nomadik ARM: nomadik: move l2x0 setup to device tree 2015-08-11 15:29:59 +02:00
mach-nspire
mach-omap1 genirq: Remove irq argument from irq flow handlers 2015-09-16 15:47:51 +02:00
mach-omap2 genirq: Remove irq argument from irq flow handlers 2015-09-16 15:47:51 +02:00
mach-orion5x ARM: DT updates for v4.3 2015-09-01 13:09:20 -07:00
mach-picoxcell
mach-prima2 Merge branches 'cleanup', 'fixes', 'misc', 'omap-barrier' and 'uaccess' into for-linus 2015-09-03 15:28:37 +01:00
mach-pxa genirq: Remove irq argument from irq flow handlers 2015-09-16 15:47:51 +02:00
mach-qcom
mach-realview
mach-rockchip ARM: rockchip: pm: Fix PTR_ERR() argument 2015-08-24 12:39:14 +02:00
mach-rpc genirq: Remove irq argument from irq flow handlers 2015-09-16 15:47:51 +02:00
mach-s3c24xx genirq: Remove irq argument from irq flow handlers 2015-09-16 15:47:51 +02:00
mach-s3c64xx genirq: Remove irq argument from irq flow handlers 2015-09-16 15:47:51 +02:00
mach-s5pv210
mach-sa1100 genirq: Remove irq argument from irq flow handlers 2015-09-16 15:47:51 +02:00
mach-shmobile libnvdimm for 4.3: 2015-09-08 14:35:59 -07:00
mach-socfpga genalloc: add name arg to gen_pool_get() and devm_gen_pool_create() 2015-09-04 16:54:41 -07:00
mach-spear ARM: SoC cleanups for v4.3 2015-09-01 12:10:20 -07:00
mach-sti ARM: SoC platform updates for v4.3 2015-09-01 12:18:40 -07:00
mach-stm32
mach-sunxi
mach-tegra ARM: SoC driver updates for v4.3 2015-09-01 13:00:04 -07:00
mach-u300
mach-uniphier ARM: uniphier: drop v7_invalidate_l1 call at secondary entry 2015-08-13 12:12:10 +02:00
mach-ux500 Merge branch 'for-linus' of git://ftp.arm.linux.org.uk/~rmk/linux-arm 2015-09-03 16:27:01 -07:00
mach-versatile
mach-vexpress
mach-vt8500
mach-w90x900
mach-zx ARM: SoC platform updates for v4.3 2015-09-01 12:18:40 -07:00
mach-zynq Merge branch 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2015-09-01 14:33:35 -07:00
mm ARM: alignment: fix alignment handling for uaccess changes 2015-09-24 11:07:00 +01:00
net
nwfpe ARM: swpan: fix nwfpe for uaccess changes 2015-09-09 23:26:11 +01:00
oprofile
plat-iop
plat-omap
plat-orion genirq: Remove irq argument from irq flow handlers 2015-09-16 15:47:51 +02:00
plat-pxa
plat-samsung
plat-versatile
probes
tools
vdso
vfp
xen Merge branch 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm 2015-09-14 12:24:10 -07:00
Kconfig Merge branch 'uaccess' into fixes 2015-09-11 19:18:28 +01:00
Kconfig-nommu
Kconfig.debug The i.MX SoC changes for 4.3: 2015-08-18 13:10:05 -07:00
Makefile ARM: 8429/1: disable GCC SRA optimization 2015-09-07 13:24:05 +01:00