From f9a4aed8c124f6857f8b628e9dea0c80bccb5b1a Mon Sep 17 00:00:00 2001 From: Sathish Ambley Date: Mon, 16 May 2016 22:32:01 -0700 Subject: [PATCH] msm: ADSPRPC: Map pages with execute permissions Allow for mappings to have execute permissions in Stage 2 SMMU as dynamic shared object may get loaded and executed from these pages on the remote processor. Change-Id: I3d7fb2829defd8efc362253866587652f35e316b Signed-off-by: Sathish Ambley --- drivers/char/adsprpc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/char/adsprpc.c b/drivers/char/adsprpc.c index 6384fcef0b10..cbdda065c404 100644 --- a/drivers/char/adsprpc.c +++ b/drivers/char/adsprpc.c @@ -598,7 +598,7 @@ static int fastrpc_mmap_create(struct fastrpc_file *fl, int fd, unsigned attr, int srcVM[1] = {VMID_HLOS}; int destVM[2] = {VMID_HLOS, vmid}; int destVMperm[2] = {PERM_READ | PERM_WRITE, - PERM_READ | PERM_WRITE }; + PERM_READ | PERM_WRITE | PERM_EXEC}; VERIFY(err, !hyp_assign_phys(map->phys, buf_page_size(map->size), @@ -670,7 +670,7 @@ static int fastrpc_buf_alloc(struct fastrpc_file *fl, ssize_t size, int srcVM[1] = {VMID_HLOS}; int destVM[2] = {VMID_HLOS, vmid}; int destVMperm[2] = {PERM_READ | PERM_WRITE, - PERM_READ | PERM_WRITE}; + PERM_READ | PERM_WRITE | PERM_EXEC}; VERIFY(err, !hyp_assign_phys(buf->phys, buf_page_size(size), srcVM, 1, destVM, destVMperm, 2));