[PATCH] Reserve static TLS for dynamically loaded initial-exec TLS only [BZ #25051]
Szabolcs Nagy
szabolcs.nagy@arm.com
Thu Feb 27 16:21:00 GMT 2020
On 21/02/2020 12:58, Florian Weimer wrote:
> * Carlos O'Donell:
>
>> On 2/17/20 11:01 AM, Florian Weimer wrote:
>>> * Carlos O'Donell:
>>>
>>>> Let me take a stab at this:
>>>>
>>>> (1) File a bug to indicate all libraries must stop using
>>>> TLS IE to fix dlmopen issues with TLS IE.
>>>
>>> Do you mean glibc components, or do you view this as a distribution-wide
>>> change?
>>
>> All glibc libraries should stop using TLS IE and we should file bugs for
>> fixing these instances where TLS IE was used to work around startup ordering
>> problems.
>
> This has performance implications, in particular for malloc.
> I'll try to get some numbers.
it has correctness implications too, e.g. in case of
errno or soft-float fenv emulation (ppc only?) tls
access may happen in signal handlers and i think
currently only initial (and local) exec tls is
guaranteed to be as-safe.
libc also has struct pthread, i wonder if any of that
needs to be duplicated for dlmopen (is it valid to
dlmopen a different version of libc.so.6 ?)
More information about the Libc-alpha
mailing list