> On Aug 30, 2018, at 9:02 PM, Jeff Law <l...@redhat.com> wrote:
> 
> On 08/30/2018 10:58 AM, Richard Henderson wrote:
>> On 08/28/2018 07:13 AM, Jeff Law wrote:
>>> Please consider using function descriptors rather than trampolines.
>>> This allows you to make the stack non-executable at all times which is
>>> good from a security standpoint.  The downside is the indirect calling
>>> mechanism has to change slightly to distinguish between a simple
>>> indirect call and one through a function descriptor (usually by having a
>>> low bit on to indicate the latter).  GIven this is an ABI change, now is
>>> probably the last opportunity to make this change.
>> 
>> Correct me if I'm wrong here:
>> 
>> Define TARGET_CUSTOM_FUNCTION_DESCRIPTORS to an appropriate value -- easy 
>> for a
>> RISC target -- and that's it.
>> 
>> Further, it pretty much only gets used by the Ada front end.  One should not
>> expect these to be used by the C front end nested functions.
> I thought it was used more extensively than that...  Thanks for checking
> into it though.
> 
> Jeff

My impression from reading the internals manual is that it's an alternative to 
trampolines -- and in fact it appears to suggest it's a superior alternative.  
I've been planning to try turning it on for pdp11 where executable stacks can 
be problematic.  (For that matter, they are on lots of other machines -- which 
is why descriptors instead of trampolines sounds like a good thing.)

        paul

Reply via email to