[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200109123651.18520-6-jens.wiklander@linaro.org>
Date: Thu, 9 Jan 2020 13:36:51 +0100
From: Jens Wiklander <jens.wiklander@...aro.org>
To: tee-dev@...ts.linaro.org, linux-kernel@...r.kernel.org
Cc: Jerome Forissier <jerome@...issier.org>,
Sumit Garg <sumit.garg@...aro.org>,
Etienne Carriere <etienne.carriere@...aro.org>,
Rijo Thomas <Rijo-john.Thomas@....com>,
Devaraj Rangasamy <Devaraj.Rangasamy@....com>,
Jens Wiklander <jens.wiklander@...aro.org>
Subject: [PATCH 5/5] tee: tee_shm_op_mmap(): use TEE_SHM_USER_MAPPED
tee_shm_op_mmap() uses the TEE_SHM_USER_MAPPED flag instead of the
TEE_SHM_REGISTER flag to tell if a shared memory object is originating
from registered user space memory.
Signed-off-by: Jens Wiklander <jens.wiklander@...aro.org>
---
drivers/tee/tee_shm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/tee/tee_shm.c b/drivers/tee/tee_shm.c
index c64ec5c5e464..deb22f877881 100644
--- a/drivers/tee/tee_shm.c
+++ b/drivers/tee/tee_shm.c
@@ -81,7 +81,7 @@ static int tee_shm_op_mmap(struct dma_buf *dmabuf, struct vm_area_struct *vma)
size_t size = vma->vm_end - vma->vm_start;
/* Refuse sharing shared memory provided by application */
- if (shm->flags & TEE_SHM_REGISTER)
+ if (shm->flags & TEE_SHM_USER_MAPPED)
return -EINVAL;
return remap_pfn_range(vma, vma->vm_start, shm->paddr >> PAGE_SHIFT,
--
2.17.1
Powered by blists - more mailing lists