On Wed, Jul 18, 2018 at 12:34:28PM -0700, Kostya Serebryany wrote:
> On Wed, Jul 18, 2018 at 12:29 PM H.J. Lu wrote:
> >
> > On Wed, Jul 18, 2018 at 11:45 AM, Kostya Serebryany wrote:
> > > On Wed, Jul 18, 2018 at 11:40 AM H.J. Lu wrote:
> > >>
> > >> On Wed, Jul 18, 2018 at 11:18 AM, Kostya Ser
On Wed, Jul 18, 2018 at 12:29 PM H.J. Lu wrote:
>
> On Wed, Jul 18, 2018 at 11:45 AM, Kostya Serebryany wrote:
> > On Wed, Jul 18, 2018 at 11:40 AM H.J. Lu wrote:
> >>
> >> On Wed, Jul 18, 2018 at 11:18 AM, Kostya Serebryany
> >> wrote:
> >> > What's ENDBR and do we really need to have it in c
On Wed, Jul 18, 2018 at 11:45 AM, Kostya Serebryany wrote:
> On Wed, Jul 18, 2018 at 11:40 AM H.J. Lu wrote:
>>
>> On Wed, Jul 18, 2018 at 11:18 AM, Kostya Serebryany wrote:
>> > What's ENDBR and do we really need to have it in compiler-rt?
>>
>> When shadow stack from Intel CET is enabled, the
On Wed, Jul 18, 2018 at 11:40 AM H.J. Lu wrote:
>
> On Wed, Jul 18, 2018 at 11:18 AM, Kostya Serebryany wrote:
> > What's ENDBR and do we really need to have it in compiler-rt?
>
> When shadow stack from Intel CET is enabled, the first instruction of all
> indirect branch targets must be a speci
On Wed, Jul 18, 2018 at 11:18 AM, Kostya Serebryany wrote:
> What's ENDBR and do we really need to have it in compiler-rt?
When shadow stack from Intel CET is enabled, the first instruction of all
indirect branch targets must be a special instruction, ENDBR. In this case,
int res = REAL(swapco
What's ENDBR and do we really need to have it in compiler-rt?
As usual, I am opposed to any gcc compiler-rt that bypass upstream.
--kcc
On Wed, Jul 18, 2018 at 8:37 AM H.J. Lu wrote:
>
> asan/asan_interceptors.cc has
>
> ...
> int res = REAL(swapcontext)(oucp, ucp);
> ...
>
> REAL(swapcontext
asan/asan_interceptors.cc has
...
int res = REAL(swapcontext)(oucp, ucp);
...
REAL(swapcontext) is a function pointer to swapcontext in libc. Since
swapcontext may return via indirect branch on x86 when shadow stack is
enabled, we need to call REAL(swapcontext) with indirect_return attribute
o