On 22 July 2012 19:26, Jakub Jermar <[email protected]> wrote:
> On 07/21/2012 12:32 PM, Jiří Zárevúcky wrote:
>> On 21 July 2012 12:20, Martin Decky <[email protected]> wrote:
>>>> Is that possible in HelenOS?
>>>
>>>
>>> That would require the entire heap (or at least some areas of the heap) to
>>> be executable. I don't think that this is a good idea, security-wise.
>>>
>>> In most cases I can imagine creating a dedicated memory area with the
>>> executable flag set should work. Can you perhaps share in more detail what
>>> is your motivation?
>>>
>>>
>>
>> Closures in the Go language are implemented using trampolines in
>> writable-executable memory.
>>
>> While perhaps not a good idea globally, this could be enabled for Go
>> binaries only, right?
>> How can I do that? I imagine it has something to do with a linker
>> script, and I have next-to-nil understanding of those.
>
> Have you considered using as_area_change_flags() to set a new protection
> mode for the stack at runtime?
>

Wonderful, that seems to work. Thank you.

I thought that since as_area_create() doesn't allow this, changing
flags after creation would make no difference.
It would seem that this restriction is some kind of leftover from the past.

_______________________________________________
HelenOS-devel mailing list
[email protected]
http://lists.modry.cz/cgi-bin/listinfo/helenos-devel

Reply via email to