]> sourceware.org Git - glibc.git/commit
nptl: Move part of TCB initialization from libpthread to __tls_init_tp
authorFlorian Weimer <fweimer@redhat.com>
Wed, 21 Apr 2021 17:49:51 +0000 (19:49 +0200)
committerFlorian Weimer <fweimer@redhat.com>
Wed, 21 Apr 2021 17:49:51 +0000 (19:49 +0200)
commit442e8a40da9dfa24aeebf4f1a163f0a58b12cf7e
tree4f425bffad25e4232f2ad8b22bc0835a1d5d7a69
parent90d7e7e5bd3b0683a27c658388b6515ce950c78e
nptl: Move part of TCB initialization from libpthread to __tls_init_tp

This initalization should only happen once for the main thread's TCB.
At present, auditors can achieve this by not linking against
libpthread.  If libpthread becomes part of libc, doing this
initialization in libc would happen for every audit namespace,
or too late (if it happens from the main libc only).  That's why
moving this code into ld.so seems the right thing to do, right after
the TCB initialization.

For !__ASSUME_SET_ROBUST_LIST ports, this also moves the symbol
__set_robust_list_avail into ld.so, as __nptl_set_robust_list_avail.
It also turned into a proper boolean flag.

Inline the __pthread_initialize_pids function because it seems no
longer useful as a separate function.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
nptl/Versions
nptl/nptl-init.c
nptl/pthread-pids.h [deleted file]
nptl/pthreadP.h
nptl/pthread_create.c
nptl/pthread_mutex_init.c
sysdeps/nptl/dl-tls_init_tp.c
sysdeps/unix/sysv/linux/pthread-pids.h [deleted file]
This page took 0.048651 seconds and 5 git commands to generate.