From 415bedaefaa4b2d7fff2babee81774723496d422 Mon Sep 17 00:00:00 2001 From: Krishna Reddy Date: Wed, 8 Feb 2017 22:13:32 -0800 Subject: [PATCH] arm64: mm: remap dma contiguous memory as non executable Dma buffers shouldn't have executable code. To ensure the security, Map dma contiguous memory as non executable in kernel. Bug 1859649 Change-Id: I8b4b6d574477f560e9a43b07287014ed981092d3 Signed-off-by: Krishna Reddy Reviewed-on: http://git-master/r/1301854 (cherry picked from commit e910098f1d91ce82c18de8b5986be0856e5bc942) Reviewed-on: http://git-master/r/1497681 Reviewed-by: Kamal Balagopalan Tested-by: Kamal Balagopalan GVS: Gerrit_Virtual_Submit --- 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 a19a96036191..3d8cdd1eef92 100644 --- a/arch/arm64/mm/dma-mapping.c +++ b/arch/arm64/mm/dma-mapping.c @@ -1452,7 +1452,7 @@ void __init dma_contiguous_remap(void) for (addr = start; addr < end; addr += PAGE_SIZE) create_mapping(addr, __phys_to_virt(addr), - PAGE_SIZE, PAGE_KERNEL_EXEC); + PAGE_SIZE, PAGE_KERNEL); } } -- 2.39.2