diff options
| author | Shay Nachmani <shayn@codeaurora.org> | 2016-11-23 12:04:29 +0200 |
|---|---|---|
| committer | Shay Nachmani <shayn@codeaurora.org> | 2016-11-23 12:04:29 +0200 |
| commit | 51b8d2c499b884c09a4e05d7fade8f16bb1c30eb (patch) | |
| tree | 0ef34231dfa6d6b4a1d861a780fceca1feea0d39 | |
| parent | 9febdfdde008c8d7875b5186a4a37cb515cb924d (diff) | |
msm: ion: Modified Secure Display buffer permissions
Made Secure Display buffer permissions RO instead of RW.
Change-Id: I617a3bb5cbb80ac3967ab14f37452c461bb4df77
Signed-off-by: Shay Nachmani <shayn@codeaurora.org>
| -rw-r--r-- | drivers/staging/android/ion/ion_cma_heap.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/staging/android/ion/ion_cma_heap.c b/drivers/staging/android/ion/ion_cma_heap.c index b2e1a4c1b170..b5905fc81147 100644 --- a/drivers/staging/android/ion/ion_cma_heap.c +++ b/drivers/staging/android/ion/ion_cma_heap.c @@ -274,11 +274,16 @@ static int ion_secure_cma_allocate(struct ion_heap *heap, source_vm = VMID_HLOS; dest_vm = get_secure_vmid(flags); + if (dest_vm < 0) { pr_err("%s: Failed to get secure vmid\n", __func__); return -EINVAL; } - dest_perms = PERM_READ | PERM_WRITE; + + if (dest_vm == VMID_CP_SEC_DISPLAY) + dest_perms = PERM_READ; + else + dest_perms = PERM_READ | PERM_WRITE; ret = ion_cma_allocate(heap, buffer, len, align, flags); if (ret) { |
