[PATCH] D33874: Implement AllocateRWX and ReleaseRWX for NetBSD

Kamil Rytarowski via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 6 14:49:05 PDT 2017


krytarowski added a comment.

In https://reviews.llvm.org/D33874#774433, @joerg wrote:

> Given that W^X is becoming a lot more popular across systems including SELinux and other variants, I think it would be better to extend MemoryBlock to store separate pointers for W and X mappings. That avoids the complexity of storing the pointer directly in the allocation.


I was thinking about this and I was evaluating this option. My concern whether it is appropriate to include additional internal pointer for all targets unconditionally or just one extra for NetBSD (and other who can catch up).

I will add this pointer without ifdefs.

> Otherwise, please check for PROT_MPROTECT (and maybe additionally NetBSD) directly, not for the version. The version check is included in libffi only due to some complexity around mmap redefinitions which are not relevant here.

Sounds good.

Should I make  these pointers (code and data) be available to every target or just for NetBSD?


Repository:
  rL LLVM

https://reviews.llvm.org/D33874





More information about the llvm-commits mailing list