arm64: Small fixes extracted from larger MMU fixup.

* User-Execute without User-Read mapping is disallowed.
* Add comments to arch_vm_set_memory_type

Change-Id: I450206ab973552dc36a7d778f573154541fd709f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8098
Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
Owen Anderson
2024-08-24 02:32:33 +00:00
committed by waddlesplash
parent 87c4aa1308
commit 087c7dd654
+8
View File
@@ -109,6 +109,12 @@ arch_vm_supports_protection(uint32 protection)
return false;
}
// User-Execute implies User-Read, because it would break PAN otherwise
if ((protection & B_EXECUTE_AREA) != 0
&& (protection & B_READ_AREA) == 0) {
return false;
}
return true;
}
@@ -122,5 +128,7 @@ arch_vm_unset_memory_type(VMArea* area)
status_t
arch_vm_set_memory_type(VMArea* area, phys_addr_t physicalBase, uint32 type)
{
// Memory type is set in page tables during mapping,
// no need to do anything more here.
return B_OK;
}