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>
This commit is contained in:
parent
9febdfdde0
commit
51b8d2c499
1 changed files with 6 additions and 1 deletions
|
@ -274,11 +274,16 @@ static int ion_secure_cma_allocate(struct ion_heap *heap,
|
||||||
|
|
||||||
source_vm = VMID_HLOS;
|
source_vm = VMID_HLOS;
|
||||||
dest_vm = get_secure_vmid(flags);
|
dest_vm = get_secure_vmid(flags);
|
||||||
|
|
||||||
if (dest_vm < 0) {
|
if (dest_vm < 0) {
|
||||||
pr_err("%s: Failed to get secure vmid\n", __func__);
|
pr_err("%s: Failed to get secure vmid\n", __func__);
|
||||||
return -EINVAL;
|
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);
|
ret = ion_cma_allocate(heap, buffer, len, align, flags);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue