If a virtual memory page is executable, does it imply that it is readable?
-
28-10-2019 - |
Question
If I created a virtual memory page on a x86 system with the page protection set to only executable, would it imply that the page is also readable?
Solution
Assuming IA-32e mode: yes, a page table entry has no bit that inhibits reading, only writing (bit 1, R/W). Pages are always readable, assuming bit 2 (U/S, User/Supervisory) allows access. Bit 63, EXB is the Execute Inhibit bit. That's it for protection flags. Chapter 3.10.3 in the Intel processor manual.
OTHER TIPS
I think the x86 doesn't have a seperate executable flag, all readable pages are executable. So I guess that means the answer is "yes" (even if the logic is backwards).
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow