Pergunta

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?

Foi útil?

Solução

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.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top