libffi: backport incorrect detection of selinux

Authored by trofi on Feb 8 2011, 3:21 PM.

Description

libffi: backport incorrect detection of selinux

This patch unbreaks ghci on GRSEC kernels hardened with
TPE (Trusted Path Execution) protection.

TPE forbids mmap('rwx') files opened for writes:

fd = open (a_file_in_tmp, O_RDWR);
mmap (...,               PROT_READ | PROT_WRITE | PROT_EXEC, fd);

while allows anonymous RWX mappings:

mmap (...MAP_ANONYMOUS , PROT_READ | PROT_WRITE | PROT_EXEC, -1);

Thanks to klondike for finding it out.

The result of a horrible typo.

(unreleased yet) upstream also has the patch:

http://github.com/atgreen/libffi/commit/eaf444eabc4c78703c0f98ac0197b1619c1b1bef

Details

Committed
trofiFeb 8 2011, 3:21 PM
Pushed
bgamariAug 25 2016, 1:39 PM
Parents
rGHCDIFFfc2fdad37937: Generate the OS X installer from a bindist, rather than from a source tree
Branches
Unknown
Tags
Unknown