MLK-13795 ARM: disable CPU_SW_DOMAIN_PAN
authorOctavian Purdila <octavian.purdila@nxp.com>
Mon, 23 Jan 2017 15:02:41 +0000 (17:02 +0200)
committerNitin Garg <nitin.garg@nxp.com>
Mon, 19 Mar 2018 19:58:07 +0000 (14:58 -0500)
The Vivante GPU driver directly accesses userspace memory (coupled
with access_ok checks before) instead of using get/put_user or
copy_to/from_user. This triggers page domain faults such as the one
bellow. While the correct fix would be to fix the driver, this would
cause divergence between our version and Vivante's so until they fix
the driver (if ever) we disable CPU_SW_DOMAIN_PA as a workaround which
introduced this extra checks.

Note: we could have make CPU_SW_DOMAIN_PAN depend on !MXC_GPU_VIV but
there are cases where the vivante driver is built out of tree and
hence we must forcefully disabled it so that out the tree built
drivers don't run into this issue.

Unhandled fault: page domain fault (0x81b) at 0x00a76368
pgd = a8d60000
[00a76368] *pgd=38eb7831, *pte=3b13175f, *ppte=3b131c7f
Internal error: : 81b 1 PREEMPT SMP ARM
Modules linked in: ov5642_camera mxc_v4l2_capture ipu_bg_overlay_sdc
ov5640_camera_mipi_int ipu_still ipu_prp_enc ipu_csi_enc
ov5640_camera_int ipu_fg_overlay_sdc v4l2_int_device mxc_dcic
CPU: 3 PID: 2153 Comm: tiger Tainted: G W 4.9.4-01661-g9190652 #16
Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree)
task: a8ac3700 task.stack: a8db4000
PC is at _RemoveRecordFromProcesDB+0x154/0x17c
LR is at gckOS_ReleaseMutex+0x14/0x24
pc : [<8072ba98>] lr : [<80701190>] psr: 20030013
sp : a8db5ba8 ip : 00000000 fp : a83c5aa8
r10: a83c6000 r9 : 00000000 r8 : 00a7635c
r7 : 00000006 r6 : a889da00 r5 : a83c6000 r4 : 00a7636c
r3 : 00000002 r2 : 00000001 r1 : 00000000 r0 : 00000000
Flags: nzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none
Control: 10c53c7d Table: 38d6004a DAC: 00000051
vddpu: bypassed regulator has no supply!
vddpu: bypassed regulator has no supply!
Process tiger (pid: 2153, stack limit = 0xa8db4210)
Stack: (0xa8db5ba8 to 0xa8db6000)
5ba0: 00000869 00000018 00000006 0000000a a85e1580 00000000
5bc0: 00000008 a8db5c3c c104e024 a83c6000 a8db5ca0 8072cbec 00000187 00000000
5be0: 00000000 c104e004 00000001 ac801d48 00000002 00000001 3c801d40 00000000
5c00: 3c800280 00a78358 4d454d56 00000000 00000000 00000010 00000001 a91d9dc0
5c20: a83c6f40 0000001a 00000869 a8db5c3c 00000869 00000001 00000869 00a76374
5c40: 00000018 3c801d40 00000058 00000000 00000000 00000002 6da83d90 00000000
5c60: 000001fb 00000000 00000000 00000002 00000a00 00000a78 00a75698 00a75c44
5c80: 00a75698 ffffffff ffffffff 6da82000 6da82040 00000869 000000de 00000000
5ca0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
5cc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
5ce0: 00a76344 00a76408 0000000c 000000a4 a868e02c a8db5d78 00000000 a889da00
5d00: 00000001 00000005 a8db4000 a8bf9180 00000000 8072aba0 a8db5ca0 00000000
5d20: 00000000 80f02d00 00000869 00000000 00000000 00000000 00000005 a8db7200
5d40: a810e000 00000051 00007530 8070647c 00000000 a803cb80 7e943848 00000000
5d60: 00000190 00000000 7e943848 00000000 00000190 00000000 00000013 00000003
5d80: 00000000 009f64e0 00000000 76e6f6a8 7e943868 00000190 00000000 00000003
5da0: 00a75640 00000000 00a78358 00000000 00000002 76d7e858 00a76294 00000000
5dc0: 00000001 000000d9 7e9438e8 9ddc4ccf 04eee266 76fc3cf0 76d7ab38 6a0e53e7
5de0: 0350729f 76d7e968 76ec14de 76ec0ba8 76fc3cf0 76fb1dac 7e943958 76fc4884
5e00: 76fb05f0 76fc4000 aaaaaaab 76fb9728 00000000 0000000d 00000000 00000000
5e20: 7e943948 6a0e53e7 76fba460 00000000 7e943958 76ec14de 7e943960 7e9439cc
5e40: 7e9439b4 76f9e494 7e943960 76fc4ab4 00000007 00000000 00000005 00000000
5e60: 00000001 76fba2a8 76b6e828 00000000 76fba460 76fba2a8 ffffffff 00000000
5e80: 76fba460 76fba2a8 ffffffff 00016040 76d7e858 76fba7f8 00a76208 00000008
5ea0: 00000018 7e9439d8 00a7634c 76db1130 7e94398c 009f54c8 00a76344 00a763d4
5ec0: 00000002 76ec0000 00064554 76fb8870 00000000 76b8a000 00000001 76fc4000
5ee0: 00000000 76fa37ac 00000000 009f54c8 00000005 009f54c8 7e943a04 00000000
5f00: 00000000 76e95428 7e943800 a865d108 a8bf9180 8020ee90 00000100 80131cc8
5f20: 00000002 00000001 a8db5f20 80f86340 00000000 00000000 763ac340 0000001c
5f40: a8ccd540 00000000 a82bd290 00000002 a8ccd548 00000000 7e943a3c 801fe010
5f60: 00000000 00000000 a8bf9180 a8bf9181 7e943800 a8bf9180 00007530 00000005
5f80: a8db4000 00000000 00000000 8020f74c 00002710 00007530 76e953b0 00000036
5fa0: 80107a04 80107840 00002710 00007530 00000005 00007530 7e943800 009f5228
5fc0: 00002710 00007530 76e953b0 00000036 00a78358 00000000 76fc4000 00000000
5fe0: 76e8541c 7e9437ec 76e6e108 76b1b2bc 20030010 00000005 00000000 00000000
[<8072ba98>] (_RemoveRecordFromProcesDB) from [<8072cbec>] (gckVGCOMMAND_Commit+0x774/0x954)
[<8072cbec>] (gckVGCOMMAND_Commit) from [<8072aba0>] (gckVGKERNEL_Dispatch+0x33c/0x4d0)
[<8072aba0>] (gckVGKERNEL_Dispatch) from [<8070647c>] (drv_ioctl+0x11c/0x29c)
[<8070647c>] (drv_ioctl) from [<8020ee90>] (do_vfs_ioctl+0x98/0x920)
[<8020ee90>] (do_vfs_ioctl) from [<8020f74c>] (SyS_ioctl+0x34/0x5c)
[<8020f74c>] (SyS_ioctl) from [<80107840>] (ret_fast_syscall+0x0/0x3c)
Code: e2844010 e59d200c ebffad92 e3a01000 (e5041004)

Signed-off-by: Octavian Purdila <octavian.purdila@nxp.com>
arch/arm/configs/imx_v7_defconfig

index 9ca5637..71f2ef3 100644 (file)
@@ -37,6 +37,7 @@ CONFIG_VMSPLIT_2G=y
 CONFIG_PREEMPT=y
 CONFIG_AEABI=y
 CONFIG_HIGHMEM=y
+# CONFIG_CPU_SW_DOMAIN_PAN is not set
 CONFIG_CMA=y
 CONFIG_CMDLINE="noinitrd console=ttymxc0,115200"
 CONFIG_CPU_FREQ=y