discuss-gnustep
[Top][All Lists]
Advanced

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

Re: gorm needs writeable and executable mappings?


From: Matt Rice
Subject: Re: gorm needs writeable and executable mappings?
Date: Fri, 20 Jan 2012 06:43:12 -0800

On Fri, Jan 20, 2012 at 5:55 AM, Richard Frith-Macdonald
<richard@tiptree.demon.co.uk> wrote:
>
> On 20 Jan 2012, at 13:18, Rogelio Serrano wrote:
>
>> i cant run gorm on a pax kernel. i get this error:
>>
>> 2012-01-20 21:04:49.737 Gorm[4283] Failed to protect memory as executable: m
>> Killed
>>
>> this is a error message from nsinvocation.m. i dont know exactly where
>> gorm calls protect. is this a bug in gorm or nsinvocation.m?
>
> Neither ... both are functioning fine ... it's a pax 'feature'.
>
> You need to use the paxctl program to disable mprotect restrictions.
> Unfortunately, I think paxctl only works for a single binary ... it would be 
> nicer to disable mprotect restrictions for the entire system (pax's decision 
> to cripple mprotect is, at best, debatable), but I don't know if that's 
> possible.

ISTR libffi working without write/exec, a search brings up the following.

https://github.com/atgreen/libffi/blob/master/src/closures.c

/* This macro indicates it may be forbidden to map anonymous memory
with both write and execute permission. Code compiled when this
option is defined will attempt to map such pages once, but if it
fails, it falls back to creating a temporary file in a writable and
executable filesystem and mapping pages from it into separate
locations in the virtual memory space, one location writable and
another executable. */



reply via email to

[Prev in Thread] Current Thread [Next in Thread]