Non-executable mappings now in NetBSD too

Peter Jeremy PeterJeremy at optushome.com.au
Sat Aug 30 15:15:13 PDT 2003


On Sat, Aug 30, 2003 at 09:59:01PM +0100, Pedro F. Giffuni wrote:
> --- Tim Kientzle <kientzle at acm.org> wrote: 
>...
>> 
>> The OpenBSD work on tightening up read/write/exec memory permissions
>> looks interesting, but I wonder what impact it has on
>> JIT technologies; do the current Java VMs or other incremental
>> compilation engines require write+exec?
>
>I haven't ever seen the source code for Java but I wouldn't think there is any
>problem. Bytecode is not really executable, and the java program doesn't need
>to modify itself either.

JIT is on-the-fly compilation to native code.  Whilst the Java
bytecode is not natively executable, a JIT JVM needs to be able to
write and immediately execute native code.  The OpenBSD W^X approach
would require system calls between the compilation and execution
steps.  My understanding of current JIT is that the compilation is
done is very small pieces and adding the overhead of a pair of system
calls would basically kill it.

>The OpenBSD people reported only Emacs got broken due to things they shouldn't
>do, and they found a workaround anyways.

Does OpenBSD support any JIT JVM?

> If perl didn't break, I think Java will survive too.

Emacs and perl both use traditional bytecode interpreters, as does the
Classic JVM.  I agree they will be unaffected.  This change will only
impact JIT JVMs.

Peter


More information about the freebsd-hackers mailing list