From owner-freebsd-hackers@FreeBSD.ORG Sat Aug 30 15:15:13 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2501316A4BF for ; Sat, 30 Aug 2003 15:15:13 -0700 (PDT) Received: from cirb503493.alcatel.com.au (c211-28-27-130.belrs2.nsw.optusnet.com.au [211.28.27.130]) by mx1.FreeBSD.org (Postfix) with ESMTP id 358BD43FE3 for ; Sat, 30 Aug 2003 15:15:06 -0700 (PDT) (envelope-from PeterJeremy@optushome.com.au) Received: from cirb503493.alcatel.com.au (localhost.alcatel.com.au [127.0.0.1])h7UMF1gh085873; Sun, 31 Aug 2003 08:15:01 +1000 (EST) (envelope-from jeremyp@cirb503493.alcatel.com.au) Received: (from jeremyp@localhost) by cirb503493.alcatel.com.au (8.12.8/8.12.8/Submit) id h7UMEwD4085869; Sun, 31 Aug 2003 08:14:58 +1000 (EST) Date: Sun, 31 Aug 2003 08:14:58 +1000 From: Peter Jeremy To: "Pedro F. Giffuni" Message-ID: <20030830221458.GC85746@cirb503493.alcatel.com.au> References: <3F510CFD.1070400@acm.org> <20030830205901.61109.qmail@web13403.mail.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030830205901.61109.qmail@web13403.mail.yahoo.com> User-Agent: Mutt/1.4.1i cc: freebsd-hackers@freebsd.org cc: kientzle@acm.org Subject: Re: Non-executable mappings now in NetBSD too X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Aug 2003 22:15:13 -0000 On Sat, Aug 30, 2003 at 09:59:01PM +0100, Pedro F. Giffuni wrote: > --- Tim Kientzle 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