tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: PAX mprotect and JIT



On Sun, Feb 26, 2017 at 03:20:46PM +0000, Christos Zoulas wrote:
> Any type of foreign API we introduce (MREMAP_DUP or whatever) we'll have to
> maintain separate patches for (which is not that bad), instead of teaching
> libffi (and friends) that we are like SE/Linux and we need to write
> files for PaX (which is disgusting). Perhaps it is simpler to just allow
> these transitions (rw- <-> r-x) by using an madvise(2) call.

They are somewhat unrelated problems. Allow mprotect to move from RW to
RX is one thing. That doesn't help if you want to do lazy compilation in
a multi-threaded programs for example. That's the part that MREMAP_DUP
solves. I wouldn't be surprised if other systems pick up the
interface...

Joerg


Home | Main Index | Thread Index | Old Index