This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Reserve static TLS for dynamically loaded initial-exec TLS only [BZ #25051]
- From: Szabolcs Nagy <szabolcs dot nagy at arm dot com>
- To: Florian Weimer <fweimer at redhat dot com>, Carlos O'Donell <codonell at redhat dot com>
- Cc: nd at arm dot com, GNU C Library <libc-alpha at sourceware dot org>
- Date: Thu, 27 Feb 2020 16:21:17 +0000
- Subject: Re: [PATCH] Reserve static TLS for dynamically loaded initial-exec TLS only [BZ #25051]
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=F3delOKe4bFFk1q7523g8qKGRFez3SI/uS8+bGau2Nw=; b=P26/lTvKOnEahR37crT0PvcNWdn1pPn1hT8mkjFUGO6KQXqOKbd40SC8DIdyeJHN+lqAM1EHV4vIPgS/7Eqx7lfDyQhAr/wkXzwA/WAXVA2BzAiacptZNkQnrrlmfI/UKrUQgHaLOUSRvh5PN95flYA5YWlUV07JVj6iqIMyYRgA4hADisL0+LEkqFKCFAvSoe90FdSjVyFqmvTaOVGc9/TU3utfLxzZ7snc5mRtGZVlr65uIsTDZ2xe+5Liqc+Eh4T5v94udOUgKuj6yj6h/w4a7CQHirHJYW9TuZp9xAnjzdRCVhH9n5A8OTQRyWUx8hGPNndhBqTm2m0pTd4OMg==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=n7XtFgvTwwfYSNl8wOPY/T7WXV/iziN7TmkUQBZ7XiDa1HOSiiKg4KDSYkrDTOxNorf2j/1cbayLJEZNIcdp6Cr9vpyi4EMnPU4wKf5EsTrGcQ4axqWI//rrfCRdyaG/sc9vUqcYxS0qmpMwAyNK0kE7wYMDCOEAjjpBj7H2z9YAD0R3UHbgm0nK/uurpArM2oJl98cKtsTDokfKGrZOrRKwkdPKGaD3fj5G536by0jFs+dAmL+qO3lyT5yq1LrWhvk6LlzdgIO3pD36UPm6gQFoT7DUvhRQofu2q88f9s7cmDhVvKmpk4IyFhMxqvbc5w4yHrxiQRI5TErAAoLE6g==
- Original-authentication-results: spf=none (sender IP is ) smtp.mailfrom=Szabolcs dot Nagy at arm dot com;
- References: <44eaccc2-f760-88c0-989a-e413e328b051@arm.com> <87lfqjv56h.fsf@oldenburg2.str.redhat.com> <5533fb62-c336-45b3-71ec-30c5e7d7ac4c@arm.com> <ed66e69b-d20c-ebae-39f3-778a5863ad53@arm.com> <5474f68c-b093-8791-ca0b-b4b715174e2c@redhat.com> <87k14lmcct.fsf@oldenburg2.str.redhat.com> <043f4682-d009-0365-9bdc-f9bd402683b5@redhat.com> <87d0a8hzbi.fsf@oldenburg2.str.redhat.com>
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 ?)