[PATCH] x86: Add __sigsetjmp_cancel and __setjmp_cancel

H.J. Lu hjl.tools@gmail.com
Thu Mar 29 20:17:00 GMT 2018


On Thu, Mar 29, 2018 at 1:15 PM, Florian Weimer <fw@deneb.enyo.de> wrote:
> * H. J. Lu:
>
>> You need to make a choice.  You either don't introduce a new symbol
>> version or don't save shadow stack for thread cancellation.  You
>> can't have both.
>
> I don't understand.  We have room to save the shadow stack pointer in
> the existing struct.

No, we don't have room in struct pthread_unwind_buf:

Note: There is an unused pointer space in pthread_unwind_buf_data.  But
it isn't suitable for saving and restoring shadow stack register since
x32 is a 64-bit process with 32-bit software pointer and kernel may
place x32 shadow stack above 4GB.  We need to save and restore 64-bit
shadow stack register for x32.

-- 
H.J.



More information about the Libc-alpha mailing list