[lkml]   [2007]   [Jun]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: JIT emulator needs
    On 6/21/07, Arjan van de Ven <> wrote:
    > On Fri, 2007-06-08 at 02:35 -0400, Albert Cahalan wrote:
    > > Right now, Linux isn't all that friendly to JIT emulators.
    > > Here are the problems and suggestions to improve the situation.
    > >
    > > There is an SE Linux execmem restriction that enforces W^X.
    > > Assuming you don't wish to just disable SE Linux, there are
    > > two ugly ways around the problem. You can mmap a file twice,
    > > or you can abuse SysV shared memory. The mmap method requires
    > > that you know of a filesystem mounted rw,exec where you can
    > > write a very large temporary file. This arbitrary filesystem,
    > > rather than swap space, will be the backing store. The SysV
    > > shared memory method requires an undocumented flag and is
    > > subject to some annoying size limits. Both methods create
    > > objects that will fail to be deleted if the program dies
    > > before marking the objects for deletion.
    > and these methods also destroy yourself on any machine with a looser
    > cache coherency between I and D-cache....
    > for all but x86 you pretty much have to do the mprotect() between the
    > two states to deal with the cache flushing properly...

    If the instructions to force data write-back and/or to
    invalidate the instruction cache are priveleged, yes.
    AFAIK, only ARM is that lame.

    For example, PowerPC lets unprivileged code run
    the required instructions.
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2007-06-22 07:59    [W:0.022 / U:20.636 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site