arm64: Fix handling of UXN bit in VMSAv8TranslationMap::Query
* A clear UXN bit only implies B_EXECUTE_AREA if the page was also user-readable. Change-Id: I01203b6539cc60550a5825c663af5d8cfe57f751 Reviewed-on: https://review.haiku-os.org/c/haiku/+/8423 Haiku-Format: Haiku-format Bot <[email protected]> Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
committed by
waddlesplash
parent
f2e8f48cc3
commit
58cef789de
@@ -865,13 +865,14 @@ VMSAv8TranslationMap::Query(addr_t va, phys_addr_t* pa, uint32* flags)
|
||||
if (is_pte_dirty(pte))
|
||||
*flags |= PAGE_MODIFIED;
|
||||
|
||||
if ((pte & kAttrUXN) == 0)
|
||||
*flags |= B_EXECUTE_AREA;
|
||||
if ((pte & kAttrPXN) == 0)
|
||||
*flags |= B_KERNEL_EXECUTE_AREA;
|
||||
|
||||
if ((pte & kAttrAPUserAccess) != 0)
|
||||
if ((pte & kAttrAPUserAccess) != 0) {
|
||||
*flags |= B_READ_AREA;
|
||||
if ((pte & kAttrUXN) == 0)
|
||||
*flags |= B_EXECUTE_AREA;
|
||||
}
|
||||
|
||||
if ((pte & kAttrSWDBM) != 0) {
|
||||
*flags |= B_KERNEL_WRITE_AREA;
|
||||
|
||||
Reference in New Issue
Block a user