On Thu, Feb 22, 2018 at 6:38 AM, Jan Hubicka <hubi...@ucw.cz> wrote:
>> >>
>> >> Hi Jan,
>> >>
>> >> https://gcc.gnu.org/ml/gcc-patches/2018-01/msg02233.html
>> >>
>> >> Is OK for trunk?
>> >
>> > I see that using register makes the problem go away and pushing address to 
>> > stack
>> > seemed bit odd anyway. However how does this work on other types of thunk?
>>
>> Kernel only uses  -mindirect-branch=thunk-extern.  I am working on a proposal
>> to use -mindirect-branch=thunk-extern in user space to support CET in a 
>> single
>> binary.  So at the end of the day, only
>> -mindirect-branch=thunk-extern will be used.
>
> OK, so it is about the fact that we do not really want to support all
> -mindirect-branch options in the future? If we don't want to support the 
> correctly,
> I wonder why we are including them at all.  Shall we at least output 
> warning/sorry

-mindirect-branch= implementation changed over time while
experimenting different
approaches.  I didn't remove the old ones when I added new ones.  We
should remove
others and only keep -mindirect-branch=thunk-extern with my proposal
to support CET
with -mindirect-branch=thunk-extern.

> when user tries other thunk type with stack unwinding enabled?

This is on my TODO list.

> (does Kernel use it?)

No, kernel doesn't use it.


-- 
H.J.

Reply via email to