This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PING: [PATCH] i386: Add TARGET_INDIRECT_BRANCH_REGISTER


On Thu, Feb 22, 2018 at 9:32 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Thu, Feb 22, 2018 at 9:10 AM, Jeff Law <law@redhat.com> wrote:
>> On 02/22/2018 07:38 AM, Jan Hubicka 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
>>> when user tries other thunk type with stack unwinding enabled?
>>> (does Kernel use it?)
>> A few notes.
>>
>> 1. It's not even clear at this time that retpolining user space binaries
>> makes any sense at all.   SO before doing anything to make this easier
>> I'd like to see a justification for why it's really needed.
>
> Hi Jeff,
>
> Which part were commenting? My patch to add TARGET_INDIRECT_BRANCH_REGISTER
> or removing -mindirect-branch choices?

Is my patch OK for trunk?

>> 2. On the other hand, the existing thunk options do make it easier to
>> test independent of hte kernel.  ie, I can turn on inline thunks by
>> default and test things in user space (ie, do thunks generally work
>> properly).
>
> It sounds reasonable.
>

Thanks.


-- 
H.J.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]