This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [BZ#17090/17620/17621]: fix DTV race, assert, and DTV_SURPLUS Static TLS limit
- From: Szabolcs Nagy <szabolcs dot nagy at arm dot com>
- To: Alexandre Oliva <aoliva at redhat dot com>, Richard Henderson <rth at twiddle dot net>
- Cc: Alan Modra <amodra at gmail dot com>, Roland McGrath <roland at hack dot frob dot com>, "codonell at redhat dot com" <codonell at redhat dot com>, "libc-alpha at sourceware dot org" <libc-alpha at sourceware dot org>, "rth at redhat dot com" <rth at redhat dot com>
- Date: Wed, 18 Mar 2015 14:46:35 +0000
- Subject: Re: [BZ#17090/17620/17621]: fix DTV race, assert, and DTV_SURPLUS Static TLS limit
- Authentication-results: sourceware.org; auth=none
- References: <ord28kkvpq dot fsf at free dot home> <20141118224048 dot 600312C3B23 at topped-with-meat dot com> <orppcjotfm dot fsf at free dot home> <20141120021703 dot 86F032C3B18 at topped-with-meat dot com> <or8uj6qse8 dot fsf at free dot home> <oroas0mzri dot fsf at free dot home> <orlhmgyall dot fsf at free dot home> <orlhlgdb8d dot fsf at livre dot home> <ormw411b25 dot fsf at livre dot home> <20150304050529 dot GD26435 at bubble dot grove dot modra dot org> <20150304110430 dot GE26435 at bubble dot grove dot modra dot org> <ory4nb6mmc dot fsf at livre dot home> <orlhja7vgs dot fsf at livre dot home> <55072871 dot 3060104 at twiddle dot net> <oregoomeda dot fsf at livre dot home>
On 17/03/15 04:34, Alexandre Oliva wrote:
> On Mar 16, 2015, Richard Henderson <rth@twiddle.net> wrote:
>> The patch looks good to me. (And success with aarch64-linux-gnu!)
>
> Thanks. Here's what I've just pushed to master, after adjusting the
> patch for changed context in NEWS and nptl_db/td_symbol_list.c.
>
>
> Fix DTV race, assert, DTV_SURPLUS Static TLS limit, and nptl_db garbage
>
this is still not a complete fix
i can see races on aarch64 and x86_64 with the same test
i described what i think the problem is on
https://sourceware.org/bugzilla/show_bug.cgi?id=17918
i think the _rtld* members that are accessed without holding
the rtld lock should only be accessed using atomics (at least
_dl_tls_generation and _dl_tls_max_dtv_idx are affected)
and may be they should be volatile too to tell the compiler
not to add spurious load/store to these accesses (since
glibc does not use c11 atomics yet)
- References:
- Re: [BZ#17090/17620/17621]: fix DTV race, assert, and DTV_SURPLUS Static TLS limit
- Re: [BZ#17090/17620/17621]: fix DTV race, assert, and DTV_SURPLUS Static TLS limit
- Re: [BZ#17090/17620/17621]: fix DTV race, assert, and DTV_SURPLUS Static TLS limit
- Re: [BZ#17090/17620/17621]: fix DTV race, assert, and DTV_SURPLUS Static TLS limit
- Re: [BZ#17090/17620/17621]: fix DTV race, assert, and DTV_SURPLUS Static TLS limit
- Re: [BZ#17090/17620/17621]: fix DTV race, assert, and DTV_SURPLUS Static TLS limit