From 20b0cbf55a20bbba273462f5611bdb65f3dab0e6 Mon Sep 17 00:00:00 2001 From: Rohit Vaswani Date: Wed, 6 May 2015 17:02:07 -0700 Subject: [PATCH] iommu: msm: Provide the IOMMU_NOEXEC flag explicitly during mapping The logic for the iommu executable flag is inverted now and all the iommu mappings are executable by default. Provide the IOMMU_NOEXEC flag where the mapping needs to be non-executable. Change-Id: Ifa0aa3d17ae79c16abdf66d2177a09b868a9f45f Signed-off-by: Rohit Vaswani [pdaly@codeaurora.org Remove kgsl/display modifications] Signed-off-by: Patrick Daly --- arch/arm64/mm/dma-mapping.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/mm/dma-mapping.c b/arch/arm64/mm/dma-mapping.c index 06a00d0e5a4a..65c5178a9ba3 100644 --- a/arch/arm64/mm/dma-mapping.c +++ b/arch/arm64/mm/dma-mapping.c @@ -1328,7 +1328,7 @@ __iommu_create_mapping(struct device *dev, struct page **pages, size_t size) len = (j - i) << PAGE_SHIFT; ret = iommu_map(mapping->domain, iova, phys, len, - IOMMU_READ|IOMMU_WRITE); + IOMMU_READ|IOMMU_WRITE|IOMMU_NOEXEC); if (ret < 0) goto fail; iova += len;