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

Commit 4496a777 authored by Jordan Crouse's avatar Jordan Crouse
Browse files

ion: Set the private page flag on secure chunks



Set the private page flag on on secure chunks to give other entities
a clue that the memory is special.

Change-Id: Ic0dedbad4b41a874a3f80dec75d0721d30307094
Signed-off-by: default avatarJordan Crouse <jcrouse@codeaurora.org>
parent f7d25bdf
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -132,6 +132,17 @@ static int secure_buffer_change_table(struct sg_table *table, int lock)
		ret = secure_buffer_change_chunk(virt_to_phys(chunk_list),
				nchunks, V2_CHUNK_SIZE, lock);

		if (!ret) {
			/*
			 * Set or clear the private page flag to communicate the
			 * status of the chunk to other entities
			 */
			if (lock)
				SetPagePrivate(sg_page(sg));
			else
				ClearPagePrivate(sg_page(sg));
		}

		kfree(chunk_list);
	}