This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: 2.25 freeze status
- From: Alexandre Oliva <aoliva at redhat dot com>
- To: Florian Weimer <fweimer at redhat dot com>
- Cc: Szabolcs Nagy <szabolcs dot nagy at arm dot com>, Siddhesh Poyarekar <siddhesh at gotplt dot org>, "libc-alpha\@sourceware.org" <libc-alpha at sourceware dot org>, nd at arm dot com
- Date: Wed, 01 Feb 2017 05:37:03 -0200
- Subject: Re: 2.25 freeze status
- Authentication-results: sourceware.org; auth=none
- References: <c4cfc6e1-ff9f-c8b3-4a56-38f8d484aa05@gotplt.org> <627e42c4-4bf4-e297-2f06-a32ea9698192@redhat.com> <588B74E3.808@arm.com> <f2ee2fed-3430-d9a9-3cee-64a8626e2905@redhat.com>
On Jan 27, 2017, Florian Weimer <fweimer@redhat.com> wrote:
>> writing to the dtv of other threads is neither
>> necessary nor correct.
> Let's do it then. Is this patch okay?
I see you're taken out the reversal of
* elf/dl-reloc.c (_dl_nothread_init_static_tls)
from the patch I proposed back on Sept 24 for BZ #19826.
I don't think it is right to drop that part.
That's the nptl-less TLS initializer analogous to
* nptl/allocatestack.c (init_one_static_tls)
in programs that link with libpthread.
Before the fix for BZs #17090, #17620, #17621 and #17628 (f8aeae3473),
we'd just abort if the static TLS modid grew past the initial DTV size.
I'm not sure there's code in place to resize the DTV within dlopen
before calling GL(dl_init_static_tls), that resolves to either
_dl_nothread_init_static_tls, that deals with the single thread, or
__pthread_init_static_tls, that calls init_one_static_tls for each
thread, so dlopening multiple static-TLS libs in a program not linked
with libpthread might abort at the assert that checks that the modid is
lower than the DTV length.
Unless you've verified that this is safe, I'd strongly advise against
dropping the analogous change for single-threaded programs from the
patch I had proposed.
I'd also suggest adding comments to the effect that 'we leave it for
tls_get_addr to update each thread's DTV, since it might need resizing'.
Thanks for taking care of this,
--
Alexandre Oliva, freedom fighter http://FSFLA.org/~lxoliva/
You must be the change you wish to see in the world. -- Gandhi
Be Free! -- http://FSFLA.org/ FSF Latin America board member
Free Software Evangelist|Red Hat Brasil GNU Toolchain Engineer