[PATCH] Reserve static TLS for dynamically loaded initial-exec TLS only [BZ #25051]
Florian Weimer
fweimer@redhat.com
Mon Feb 17 16:02:00 GMT 2020
* 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?
> (2) Set DL_NNS to 4, and add a tunable that lets you change
> the limit to reduce surplus memory allocated.
>
> (2.a) send linux man-pages a patch to make dlmopen(3)
> ambiguous about how many namespaces are supported and
> to point at the tunable to increase the memory used.
>
> (3) I think that the surplus should be split into two
> blocks:
> (3.a) Some reserved for TLS IE libs.
> (3.b) Some reserved for tlsdesc optimization.
>
> My opinion is that any library that is loaded and
> needs TLS IE should be able to use (3.a). We should
> reserve enough for (3.a) to be able to load glibc
> libraries, libgomp, and libgl (as you note).
There's also a potential for not letting audit libraries consume
namespace slots (once they are dynamic). This will enable lower DL_NNS
defaults.
Thanks,
Florian
More information about the Libc-alpha
mailing list