android_kernel_oneplus_msm8998/drivers/iommu
Patrick Daly 23daa77f24 iommu/arm-smmu: Fix a Null pointer dereference
Introduced by 99afd0531465fdaa95aaf5d0a9b73f7669d0f9c7.
"iommu/arm-smmu: Be explicit about security mechanism"

Internal error: Oops: 96000006 [#1] PREEMPT SMP
[<ffffffc0009f37d0>] arm_smmu_is_master_side_secure+0x14/0x28
[<ffffffc0009f029c>] io_pgtable_free_pages_exact+0x30/0x94
[<ffffffc0009f0388>] __arm_lpae_free_pgtable+0x88/0xf0
[<ffffffc0009f03e4>] __arm_lpae_free_pgtable+0xe4/0xf0
[<ffffffc0009f0410>] arm_lpae_free_pgtable+0x20/0x38
[<ffffffc0009f01cc>] free_io_pgtable_ops+0x24/0x30
[<ffffffc0009f4ce8>] arm_smmu_domain_destroy+0x1c/0xa8
[<ffffffc0009ed0cc>] iommu_domain_free+0x1c/0x34
[<ffffffc0009f35c4>] iommu_debug_device_profiling+0x660/0x6a4
[<ffffffc0009f361c>] iommu_debug_secure_profiling_show+0x14/0x24
[<ffffffc0001c4a2c>] seq_read+0x180/0x3b0

Found when running:
cat /sys/kernel/debug/iommu/tests/client_name/secure_profiling

Add a new smmu_domain variable to track whether the domain belongs to a
master-side or slave-side secure context.

Change-Id: Ib32cc6fb03f863522de10e416007114c6e91776f
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
2016-03-23 21:25:40 -07:00
..
amd_iommu.c iommu/amd: Correct the wrong setting of alias DTE in do_attach 2016-02-25 12:01:21 -08:00
amd_iommu_init.c IOMMU Updates for Linux v4.4 2015-11-05 16:12:10 -08:00
amd_iommu_proto.h IOMMU Updates for Linux v4.2 2015-06-23 18:27:19 -07:00
amd_iommu_types.h IOMMU Updates for Linux v4.4 2015-11-05 16:12:10 -08:00
amd_iommu_v2.c iommu/amd: Do proper access checking before calling handle_mm_fault() 2015-12-14 15:37:47 +01:00
arm-smmu-v3.c Merge branches 'x86/vt-d', 'arm/omap', 'arm/smmu', 's390', 'core' and 'x86/amd' into next 2015-11-02 20:03:34 +09:00
arm-smmu.c iommu/arm-smmu: Fix a Null pointer dereference 2016-03-23 21:25:40 -07:00
dma-iommu.c iommu/dma: Use correct offset in map_sg 2016-01-07 13:36:41 +01:00
dmar.c iommu/vt-d: Fix 64-bit accesses to 32-bit DMAR_GSTS_REG 2016-02-25 12:01:22 -08:00
exynos-iommu.c iommu/exynos: Add callback for initializing devices from device tree 2015-05-29 10:50:08 +02:00
fsl_pamu.c powerpc/fsl: Move fsl_guts.h out of arch/powerpc 2015-10-21 18:05:50 -05:00
fsl_pamu.h iommu/fsl: Various cleanups 2015-02-03 18:47:18 +01:00
fsl_pamu_domain.c iommu/fsl: Convert to device_group call-back 2015-10-22 00:00:49 +02:00
fsl_pamu_domain.h iommu/fsl: Make use of domain_alloc and domain_free 2015-03-31 15:32:14 +02:00
intel-iommu.c Revert "scatterlist: use sg_phys()" 2016-03-22 11:15:33 -07:00
intel-svm.c iommu/vt-d: Clear PPR bit to ensure we get more page request interrupts 2016-02-25 12:01:22 -08:00
intel_irq_remapping.c iommu/vt-d: Fix 64-bit accesses to 32-bit DMAR_GSTS_REG 2016-02-25 12:01:22 -08:00
io-pgtable-arm.c Merge remote-tracking branch 'lsk-44/linux-linaro-lsk-v4.4' into 44rc2 2016-03-23 20:51:00 -07:00
io-pgtable-msm-secure.c iommu/arm-smmu: Add support for slave side protection 2016-03-23 21:25:36 -07:00
io-pgtable.c iommu/arm-smmu: Add support for slave side protection 2016-03-23 21:25:36 -07:00
io-pgtable.h iommu/arm-smmu: Add support for slave side protection 2016-03-23 21:25:36 -07:00
iommu-debug.c drivers: iommu, leds, input, clk, devfreq: fix warnings 2016-03-23 20:57:40 -07:00
iommu-debug.h iommu: Add debugging infrastructure 2016-03-22 11:13:15 -07:00
iommu-sysfs.c
iommu-traces.c
iommu.c iommu: Add NULL pointer check in iommu_present function 2016-03-23 21:16:17 -07:00
iova.c iommu: Make the iova library a module 2015-07-28 15:48:01 +01:00
ipmmu-vmsa.c iommu/ipmmu-vmsa: Don't truncate ttbr if LPAE is not enabled 2015-12-28 17:10:52 +01:00
irq_remapping.c iommu/vt-d: Add a command line parameter for VT-d posted-interrupts 2015-10-01 15:06:54 +02:00
irq_remapping.h iommu, x86: Setup Posted-Interrupts capability for Intel iommu 2015-06-12 11:33:52 +02:00
Kconfig iommu/io-pgtable-arm: Don't use dma_to_phys() 2016-03-22 11:15:24 -07:00
Makefile iommu/arm-smmu: Add support for slave side protection 2016-03-23 21:25:36 -07:00
msm_dma_iommu_mapping.c iommu: msm: Allow passing dma_attrs for lazy mapping 2016-03-22 11:13:18 -07:00
of_iommu.c of: iommu: Silence misleading warning 2015-08-03 16:07:49 +02:00
omap-iommu-debug.c fs/seq_file: convert int seq_vprint/seq_printf/etc... returns to void 2015-09-11 15:21:34 -07:00
omap-iommu.c iommu/omap: Add support for configuring dsp iommus on DRA7xx 2015-10-14 14:35:47 +02:00
omap-iommu.h iommu/omap: Add support for configuring dsp iommus on DRA7xx 2015-10-14 14:35:47 +02:00
omap-iopgtable.h iommu/omap: Use BIT(x) macros in omap-iopgtable.h 2015-08-03 16:04:42 +02:00
rockchip-iommu.c Merge branches 'arm/rockchip', 'arm/exynos', 'arm/smmu', 'x86/vt-d', 'x86/amd', 'default-domains' and 'core' into next 2015-06-19 17:17:47 +02:00
s390-iommu.c s390/pci_dma: handle dma table failures 2015-11-09 09:10:49 +01:00
shmobile-iommu.c iommu/shmobile: Make use of domain_alloc and domain_free 2015-03-31 15:32:13 +02:00
shmobile-ipmmu.c iommu: drop owner assignment from platform_drivers 2014-10-20 16:20:42 +02:00
shmobile-ipmmu.h
tegra-gart.c Merge branches 'iommu/fixes', 'x86/vt-d', 'x86/amd', 'arm/smmu', 'arm/tegra' and 'core' into next 2015-04-02 13:33:19 +02:00
tegra-smmu.c iommu/tegra-smmu: Parameterize number of TLB lines 2015-08-13 17:05:28 +02:00