Skip to content
Commit db094b8d authored by Leandro Pereira's avatar Leandro Pereira Committed by Anas Nashif
Browse files

kernel: mem_domain: Check for overlapping regions when considering W^X



Multiple partitions can be added to a domain, and if they overlap, they
can have different attributes.  The previous check would only check for
W^X for individual partitions, and this is insufficient.  Overlapping
partitions could have W^X attributes, but in the end, a memory region
would be writable and executable.

The way this is performed is quite "heavyweight", as it is implemented
in a O(n^2) operation.  The number of partitions per domain is small on
most devices, so this isn't an issue.  CONFIG_EXECUTE_XOR_WRITE is
still an optional feature.

Signed-off-by: default avatarLeandro Pereira <leandro.pereira@intel.com>
parent 3cbc5c50
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment