FreeBSD and DEP aka "NX bit"?

Peter Wemm peter at wemm.org
Wed Aug 27 20:13:02 UTC 2008


On Wed, Aug 27, 2008 at 2:10 AM, Robert Watson <rwatson at freebsd.org> wrote:
> On Wed, 27 Aug 2008, Andrew Reilly wrote:
>
>> On Tue, Aug 26, 2008 at 09:28:07AM -0700, Alfred Perlstein wrote:
>>>
>>> * Andrew Reilly <andrew-freebsd at areilly.bpc-users.org> [080826 00:51]
>>> wrote:
>>>>
>>>> I've been using 7-STABLE on amd64 for a long time, and haven't noticed
>>>> any problems with Java or SBCL lisp or PLT-scheme, all of which use JIT code
>>>> generation (but probably neither use jemalloc?)
>>>
>>> mprotect(2)?
>>
>> Fair enough.  Good to know that it's actually tweaking the NX permissions,
>> I guess.  The man page seems a little vague about when it might succeed, and
>> what effect it might have...
>
> We're behind on the not-mapping-writable stuff, so for better (and worse)
> quite a few such things in application have been faulted in by other
> operating systems already.  That doesn't mean there won't be issues, but
> does have the redeeming aspect that things should be less bumpy for us going
> forward. Hopefully we can start making that progress a bit more quickly...

I recall seeing config.h code chunks to turn sections of the stack
on/off for execution on (I think) sparc64.  It might have been for
netbsd.  If my memory serves correctly, libgcc grew code to do
mprotect(), and the gcc code generator would call it as appropriate
when it needed to do its magic.  I think this was for an older version
of gcc though.


-- 
Peter Wemm - peter at wemm.org; peter at FreeBSD.org; peter at yahoo-inc.com; KI6FJV
"All of this is for nothing if we don't go to the stars" - JMS/B5
"If Java had true garbage collection, most programs would delete
themselves upon execution." -- Robert Sewell


More information about the freebsd-arch mailing list