From owner-freebsd-hackers@FreeBSD.ORG Sat Aug 30 19:46:55 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 BA48116A4BF for ; Sat, 30 Aug 2003 19:46:55 -0700 (PDT) Received: from 141.com (mail.141.com [65.168.139.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id B231043FDF for ; Sat, 30 Aug 2003 19:46:54 -0700 (PDT) (envelope-from arlankfo@141.com) Date: Sat, 30 Aug 2003 20:50:45 -0600 Message-Id: <200308302050.AA2582249810@141.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii From: "Andrew Lankford" To: X-Mailer: X-Declude-Sender: arlankfo@141.com [127.0.0.1] X-Note: This E-mail was scanned for spam. cc: Peter Jeremy cc: "Pedro F. Giffuni" Subject: Re: Non-executable mappings now in NetBSD too X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: arlankfo@141.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Aug 2003 02:46:55 -0000 > Whilst the Java bytecode is not natively executable, a JIT JVM >needs to be able towrite 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. Even simpler to compile to a temporary file and then exit the temporary file. Woohoo, potential race condition!

...Or you could make a nifty new system call that creates a pipe to a newly forked child process. You write the compiled executable to the fork, and the child jumps to the begining of that compiled code as soon as your parent process closes the pipe!

Gratuitous/pointless, but fun to think about. Andrew Lankford