memory-managementx86virtual-memorypage-tables

If a virtual memory page is executable, does it imply that it is readable?


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.