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

Skip to content
Commit b6321c63 authored by Steve Capper's avatar Steve Capper Committed by Michael Bohan
Browse files

ARM64: mm: Make PAGE_NONE pages read only and no-execute.



If we consider the following code sequence:

	my_pte = pte_modify(entry, myprot);
	x = pte_write(my_pte);
	y = pte_exec(my_pte);

If myprot comes from a PROT_NONE page, then x and y will both be
true which is undesireable behaviour.

This patch sets the no-execute and read-only bits for PAGE_NONE
such that the code above will return false for both x and y.

Signed-off-by: default avatarSteve Capper <steve.capper@linaro.org>
Acked-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
Git-commit: 072b1b62a6436b71ab951faae4500db2fbed63de
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git


[imaund@codeaurora.org: resolve merge conflicts]
Signed-off-by: default avatarIan Maund <imaund@codeaurora.org>
parent 7d9e5542
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment