[PATCH] D35558: Use sys::Memory::AllocateRWX for JIT code

Lang Hames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 19 17:05:33 PDT 2017


lhames added a comment.

> Right, the pages are allocated RWX.

It seems odd to prevent the flipping of the W/X bits while allowing RWX pages. I assume there are additional privileges required (granted only to JITs and debuggers?) to get RWX pages? Is there a good source for me to read up about the PaX MPROTECT design?

I think we need to consider this design further before we move to it by default, but I am keen to look into this: to the extent that we can support RWX pages there are some excellent optimizations we can make for JIT'd code that have been on my wish-list for a while.

We could develop the new scheme alongside the old one by introducing parallel RWX-based stub and callback managers.


Repository:
  rL LLVM

https://reviews.llvm.org/D35558





More information about the llvm-commits mailing list