Subject: Re: non-executable pages
To: Rui Paulo <email@example.com>
From: Chuck Silvers <firstname.lastname@example.org>
Date: 05/14/2004 08:56:08
On Mon, May 10, 2004 at 08:04:06PM +0000, Rui Paulo wrote:
> What is the status of the non-executable pages support in NetBSD?
for all platforms where the hardware supports this (except hppa),
netbsd supports PROT_EXEC, though not necessarily on a per-page basis
depending on the limitations of the hardware.
on i386, the hardware support is pretty limited, so the granularity
is very coarse. the current implementation is that there are only
two regions of the application address space which may be independently
executable or not: the stack (the traditional unix process stack,
not pthread stacks) and everything else. by default, the stack is
not executable and everything else is executable.
other platforms have fewer restrictions, with the best ones being
amd64, sparc64, powerpc(ibm4xx) and alpha, all of which allow each page
to be independently executable or not.
> Is there any compile time kernel option to activate it ?
no, it's always enabled.