diff options
| author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2022-01-24 10:46:16 -0300 |
|---|---|---|
| committer | Carlos O'Donell <carlos@redhat.com> | 2022-03-29 17:02:24 -0400 |
| commit | faedaa0f9a802820fb0f04e9d568db1e15326213 (patch) | |
| tree | a0cc5c140cd5ddd20998871e9bb148a516c32da4 /sysdeps | |
| parent | b8d11f955108dc1d444538dc31ef64c18d0142fc (diff) | |
| download | glibc-faedaa0f9a802820fb0f04e9d568db1e15326213.tar.xz glibc-faedaa0f9a802820fb0f04e9d568db1e15326213.zip | |
elf: Fix initial-exec TLS access on audit modules (BZ #28096)
For audit modules and dependencies with initial-exec TLS, we can not
set the initial TLS image on default loader initialization because it
would already be set by the audit setup. However, subsequent thread
creation would need to follow the default behaviour.
This patch fixes it by setting l_auditing link_map field not only
for the audit modules, but also for all its dependencies. This is
used on _dl_allocate_tls_init to avoid the static TLS initialization
at load time.
Checked on x86_64-linux-gnu, i686-linux-gnu, and aarch64-linux-gnu.
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
(cherry picked from commit 254d3d5aef2fd8430c469e1938209ac100ebf132)
Diffstat (limited to 'sysdeps')
| -rw-r--r-- | sysdeps/generic/ldsodefs.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h index 14a306c306..f8570f2852 100644 --- a/sysdeps/generic/ldsodefs.h +++ b/sysdeps/generic/ldsodefs.h @@ -1242,7 +1242,7 @@ extern void _dl_allocate_static_tls (struct link_map *map) attribute_hidden; /* These are internal entry points to the two halves of _dl_allocate_tls, only used within rtld.c itself at startup time. */ extern void *_dl_allocate_tls_storage (void) attribute_hidden; -extern void *_dl_allocate_tls_init (void *); +extern void *_dl_allocate_tls_init (void *, bool); rtld_hidden_proto (_dl_allocate_tls_init) /* Deallocate memory allocated with _dl_allocate_tls. */ |
