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

Commit 0b8a454e authored by Liam Mark's avatar Liam Mark
Browse files

ion: Set the page private bit for secure CMA buffers



Set the private page bit on each sg of secure CMA buffers
to inform other entities, which import these buffers as an
fd, that this memory is secure.

Change-Id: I2f012443f99a90e20afd7e43b62b751c3eea4be3
Signed-off-by: default avatarHareesh Gundu <hareeshg@codeaurora.org>
[lmark@codeaurora.org: re-factored for new ION code base]
Signed-off-by: default avatarLiam Mark <lmark@codeaurora.org>
parent 6f808a5a
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -201,7 +201,7 @@ struct ion_heap *ion_cma_heap_create(struct ion_platform_heap *data)
static void ion_secure_cma_free(struct ion_buffer *buffer)
{
	if (ion_hyp_unassign_sg_from_flags(buffer->sg_table, buffer->flags,
					   false))
					   true))
		return;

	ion_cma_free(buffer);
@@ -220,7 +220,7 @@ static int ion_secure_cma_allocate(
		goto out;
	}

	ret = ion_hyp_assign_sg_from_flags(buffer->sg_table, flags, false);
	ret = ion_hyp_assign_sg_from_flags(buffer->sg_table, flags, true);
	if (ret)
		goto out_free_buf;