Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8e38a300 authored by Shrenuj Bansal's avatar Shrenuj Bansal
Browse files

msm: kgsl: Add EXEC permission to the unassign call



When calling hyp_assign to free a secure buffer we need to pass
in RWX permissions so that when the Hypervisor unmaps the buffer
and maps it back to HLOS, the HLOS is able to use the same
memory for data and instructions.

Change-Id: I71e06a81df85891fecb11c5f197acd54979d2887
Signed-off-by: default avatarShrenuj Bansal <shrenujb@codeaurora.org>
parent 66f4f85a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -417,7 +417,7 @@ static void kgsl_page_alloc_free(struct kgsl_memdesc *memdesc)
	/* Secure buffers need to be unlocked before being freed */
	if (memdesc->priv & KGSL_MEMDESC_TZ_LOCKED) {
		int ret;
		int dest_perms = PERM_READ | PERM_WRITE;
		int dest_perms = PERM_READ | PERM_WRITE | PERM_EXEC;
		int source_vm = VMID_CP_PIXEL;
		int dest_vm = VMID_HLOS;

+1 −0
Original line number Diff line number Diff line
@@ -29,6 +29,7 @@

#define PERM_READ                       0x4
#define PERM_WRITE                      0x2
#define PERM_EXEC			0x1

#ifdef CONFIG_MSM_SECURE_BUFFER
int msm_secure_table(struct sg_table *table);