[PATCHi v2] aarch64: Add split-stack TCB field
Carlos O'Donell
carlos@redhat.com
Tue Mar 14 01:18:00 GMT 2017
On 02/14/2017 05:03 AM, Florian Weimer wrote:
> On 02/13/2017 08:45 PM, Adhemerval Zanella wrote:
>> +/* This is the size we need before TCB. Check if there is room
>> for + tcbprehead_t in struct pthread's final padding and if not
>> add it on + required pre-tcb size. */ +# define TLS_PRE_TCB_SIZE
>> \ + (sizeof (struct pthread) \ + +
>> (PTHREAD_STRUCT_END_PADDING < sizeof (tcbprehead_t) \ +
>> ? ALIGN_UP (sizeof (tcbprehead_t), sizeof (struct pthread)) \ +
>> : 0))
>
> How does this preserve the alignment of struct pthread?
>
> It's also not clear to me how the “version control” aspect of
> __tcb_private_ss is supposed to work. If the intent is to prevent
> loading of split-stack binaries with an older glibc, then a data
> symbol would be a safer choice.
Why is a data symbol a safer choice?
I'm curious, because I recommended the design pattern that Adhemerval
is copying from the POWER example.
--
Cheers,
Carlos.
More information about the Libc-alpha
mailing list