Question

enter image description here

this is a figure from Intel architecture manual. in x86 32bit page table entry, where is the bit which indicates if the page is executable or not?

if it's not here, how can a OS set memory permission for exec? with something like mmap function?

Was it helpful?

Solution

AFAIK, a page is executable if it's readable, so they all executable. But, what you might thinking here is that, there are pages which has nonexec bit set. Well, that's a software hack, done from kernel. This technique was introduced to avoid stackoverflow based attack, by making a particular page (vm area) non-executable.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top