…lbacks
Under linux, if SELinux is enabled (i.e. not permisive or disabled), then the heap memory allocated with vmalloc() and marked as executable with mprotect() will fail. In order to have this work with SELinux enabled (and not providing a module policy file to allow execheap) mmap() should be used.
Note, it might be possible to remove the stdlib.h and sys/mman.h header file references.
See: http://lists.squeakfoundation.org/pipermail/vm-dev/2018-October/029102.html You can view, comment on, or merge this pull request online at:
https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/299
-- Commit Summary --
* replace valloc() with mmap() when allocating executable pages for callbacks
-- File Changes --
M platforms/Cross/plugins/IA32ABI/ia32abicc.c (7) M platforms/Cross/plugins/IA32ABI/x64sysvabicc.c (7)
-- Patch Links --
https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/299.patch https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/299.diff
Bob, could you add a comment in front of the mmap call that says this is equivalent to valloc but that it doesn't work on the version of selinux that gave the grief?
Merged #299 into Cog.
vm-dev@lists.squeakfoundation.org