Re: RFA: Need to extend x86 psABI to support thread cancellation and alternate signal stack

2018-03-28 Thread H.J. Lu
On Tue, Mar 27, 2018 at 8:55 AM, H.J. Lu wrote: > On Tue, Mar 27, 2018 at 8:43 AM, Florian Weimer wrote: >> On 03/27/2018 01:26 PM, H.J. Lu wrote: >> >>> 2. Since shadow stack is never saved and restored by compiler, unwinder >>> in libgcc counts how many stack frame it has to unwind and uses INC

Re: RFA: Need to extend x86 psABI to support thread cancellation and alternate signal stack

2018-03-27 Thread H.J. Lu
On Tue, Mar 27, 2018 at 8:43 AM, Florian Weimer wrote: > On 03/27/2018 01:26 PM, H.J. Lu wrote: > >> 2. Since shadow stack is never saved and restored by compiler, unwinder >> in libgcc counts how many stack frame it has to unwind and uses INCSSP >> to pop shadow stack. This can't unwind the orig

Re: RFA: Need to extend x86 psABI to support thread cancellation and alternate signal stack

2018-03-27 Thread Florian Weimer
On 03/27/2018 01:26 PM, H.J. Lu wrote: 2. Since shadow stack is never saved and restored by compiler, unwinder in libgcc counts how many stack frame it has to unwind and uses INCSSP to pop shadow stack. This can't unwind the original shadow stack when the alternate shadow stack is used. _URC_N

Re: RFA: Need to extend x86 psABI to support thread cancellation and alternate signal stack

2018-03-27 Thread H.J. Lu
On Mon, Mar 26, 2018 at 11:31 PM, Florian Weimer wrote: > On 03/27/2018 12:43 AM, H.J. Lu wrote: >> >> On Linux, when alternate signal stack is used with thread cancellation, >> _Unwind_Resume fails when it tries to unwind shadow stack from signal >> handler on alternate signal stack. The issue i

Re: RFA: Need to extend x86 psABI to support thread cancellation and alternate signal stack

2018-03-26 Thread Florian Weimer
On 03/27/2018 12:43 AM, H.J. Lu wrote: On Linux, when alternate signal stack is used with thread cancellation, _Unwind_Resume fails when it tries to unwind shadow stack from signal handler on alternate signal stack. The issue is that signal handler on alternate signal stack uses a separate shado

RFA: Need to extend x86 psABI to support thread cancellation and alternate signal stack

2018-03-26 Thread H.J. Lu
On Linux, when alternate signal stack is used with thread cancellation, _Unwind_Resume fails when it tries to unwind shadow stack from signal handler on alternate signal stack. The issue is that signal handler on alternate signal stack uses a separate shadow stack and we must switch to the origina