Florian Weimer
53b3a3a26f
elf: Support recursive use of dynamic TLS in interposed malloc
...
It turns out that quite a few applications use bundled mallocs that
have been built to use global-dynamic TLS (instead of the recommended
initial-exec TLS). The previous workaround from
commit afe42e935b3ee97bac9a7064157587777259c60e ("elf: Avoid some
free (NULL) calls in _dl_update_slotinfo") does not fix all
encountered cases unfortunatelly.
This change avoids the TLS generation update for recursive use
of TLS from a malloc that was called during a TLS update. This
is possible because an interposed malloc has a fixed module ID and
TLS slot. (It cannot be unloaded.) If an initially-loaded module ID
is encountered in __tls_get_addr and the dynamic linker is already
in the middle of a TLS update, use the outdated DTV, thus avoiding
another call into malloc. It's still necessary to update the
DTV to the most recent generation, to get out of the slow path,
which is why the check for recursion is needed.
The bookkeeping is done using a global counter instead of per-thread
flag because TLS access in the dynamic linker is tricky.
All this will go away once the dynamic linker stops using malloc
for TLS, likely as part of a change that pre-allocates all TLS
during pthread_create/dlopen.
Fixes commit d2123d68275acc0f061e73d5f86ca504e0d5a344 ("elf: Fix slow
tls access after dlopen [BZ #19924 ]").
Reviewed-by: Szabolcs Nagy <szabolcs.nagy@arm.com>
(cherry picked from commit 018f0fc3b818d4d1460a4e2384c24802504b1d20)
2025-01-11 08:19:41 -08:00
..
2021-01-13 05:51:17 -08:00
2020-12-04 09:35:43 +01:00
2021-01-29 14:08:18 -03:00
2019-05-23 11:49:44 +02:00
2021-01-29 14:08:18 -03:00
2022-01-01 11:40:24 -08:00
2024-10-29 10:16:26 +01:00
2022-01-17 10:57:09 -03:00
2022-01-01 11:40:24 -08:00
2022-05-02 09:06:39 -07:00
2022-06-02 15:20:36 -04:00
2022-08-11 22:11:14 +08:00
2023-09-11 09:35:47 +02:00
2022-01-01 11:40:24 -08:00
2025-01-10 08:49:31 -08:00
2022-01-27 18:52:05 +01:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-04-27 08:36:09 -03:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-05-16 15:03:49 -03:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-05-16 18:42:03 +02:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-02-10 09:16:12 -03:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2023-07-07 11:14:39 +02:00
2022-01-07 13:21:57 +01:00
2023-10-18 14:31:02 +02:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-09-15 14:44:49 +02:00
2022-01-01 11:40:24 -08:00
2023-10-18 14:31:02 +02:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-04-26 14:24:36 +02:00
2023-10-18 14:30:00 +02:00
2023-10-18 14:30:00 +02:00
2022-01-01 11:40:24 -08:00
2022-10-26 10:03:00 -03:00
2022-04-13 21:23:04 -05:00
2022-02-10 09:16:13 -03:00
2022-02-21 07:57:18 -08:00
2022-01-01 11:40:24 -08:00
2022-06-02 15:20:36 -04:00
2022-01-14 20:17:05 +01:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2025-01-10 08:49:31 -08:00
2022-01-01 11:40:24 -08:00
2022-01-14 20:17:05 +01:00
2022-04-13 21:23:04 -05:00
2022-01-01 11:40:24 -08:00
2022-01-03 05:16:03 -08:00
2025-01-10 08:49:31 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-18 14:40:21 +01:00
2022-09-20 11:06:05 +02:00
2022-01-01 11:40:24 -08:00
2023-02-03 10:58:23 -03:00
2022-01-01 11:40:24 -08:00
2022-05-27 12:34:49 -07:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-02-10 11:50:52 +01:00
2020-11-16 19:33:30 +01:00
2022-01-01 11:40:24 -08:00
2025-01-11 08:19:41 -08:00
2022-01-01 11:40:24 -08:00
2023-10-02 15:40:33 -04:00
2022-01-01 11:40:24 -08:00
2023-04-28 16:17:19 +02:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-04-26 10:16:11 -07:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-04-20 13:52:45 -07:00
2023-10-18 14:31:02 +02:00
2021-10-21 11:23:53 -03:00
2022-04-26 10:16:11 -07:00
2024-07-16 17:25:24 +02:00
2022-04-19 15:52:27 -07:00
2022-04-26 10:16:11 -07:00
2024-05-02 23:18:23 +02:00
2024-05-02 23:18:23 +02:00
2021-01-13 11:50:08 -08:00
2022-01-01 11:40:24 -08:00
2019-02-28 11:52:44 +01:00
2019-02-28 11:52:44 +01:00
2019-02-28 11:52:44 +01:00
2019-02-28 11:52:44 +01:00
2021-01-13 11:50:08 -08:00
2022-01-01 11:40:24 -08:00
2022-06-08 15:28:41 +02:00
2022-05-16 15:03:49 -03:00
2022-01-01 11:42:26 -08:00
2022-06-24 17:45:58 -03:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-04-27 08:36:09 -03:00
2022-04-27 08:36:09 -03:00
2022-04-27 08:36:09 -03:00
2022-04-27 08:36:09 -03:00
2022-04-27 08:36:09 -03:00
2022-01-01 11:40:24 -08:00
2025-01-11 08:19:41 -08:00
2022-01-01 11:40:24 -08:00
2022-05-27 12:34:49 -07:00
2022-05-27 12:34:49 -07:00
2022-03-31 08:59:23 -03:00
2022-01-31 07:05:48 -08:00
2022-01-01 11:42:26 -08:00
2022-05-16 15:03:49 -03:00
2022-05-16 15:03:49 -03:00
2022-03-31 08:59:23 -03:00
2022-03-31 08:59:23 -03:00
2022-01-01 11:40:24 -08:00
2021-09-19 13:51:35 -07:00
2022-11-08 22:46:32 -05:00
2025-01-11 08:19:41 -08:00
2023-10-18 14:30:00 +02:00
2022-05-23 10:38:40 -05:00
2022-05-23 10:38:40 -05:00
2022-01-17 10:57:09 -03:00
2020-05-18 15:39:34 +02:00
2022-02-01 14:49:46 -03:00
2022-01-01 11:42:26 -08:00
2022-01-01 11:42:26 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2018-06-29 17:10:43 +01:00
2022-01-01 11:40:24 -08:00
2020-04-30 08:52:08 -05:00
2022-01-01 11:40:24 -08:00
2022-01-18 14:38:15 -03:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2021-10-12 13:25:43 -03:00
2022-01-04 04:56:08 -08:00
2021-10-12 13:25:43 -03:00
2021-10-12 13:25:43 -03:00
2021-10-12 13:25:43 -03:00
2021-10-12 13:25:43 -03:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-02-01 14:49:46 -03:00
2022-01-01 11:40:24 -08:00
2023-10-18 14:31:02 +02:00
2022-02-01 14:49:46 -03:00
2022-02-01 14:49:46 -03:00
2022-02-01 14:49:46 -03:00
2022-02-01 14:49:46 -03:00
2022-02-01 14:49:46 -03:00
2022-02-01 14:49:46 -03:00
2022-02-01 14:49:46 -03:00
2022-02-01 14:49:46 -03:00
2022-02-01 14:49:46 -03:00
2022-02-01 14:49:46 -03:00
2022-02-01 14:49:46 -03:00
2022-02-01 14:49:46 -03:00
2022-02-01 14:49:46 -03:00
2022-03-31 09:12:16 -03:00
2022-03-31 09:12:16 -03:00
2022-02-01 14:49:46 -03:00
2022-02-01 14:49:46 -03:00
2022-02-01 14:49:46 -03:00
2022-02-01 14:49:46 -03:00
2022-07-08 14:35:37 +02:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-02-01 14:49:46 -03:00
2022-02-01 14:49:46 -03:00
2022-01-01 11:40:24 -08:00
2022-02-01 14:49:46 -03:00
2022-02-01 14:49:46 -03:00
2022-02-09 08:47:42 -03:00
2022-02-01 14:49:46 -03:00
2022-02-01 14:49:46 -03:00
2022-02-09 08:47:42 -03:00
2022-04-07 20:38:23 +02:00
2023-07-07 11:14:39 +02:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2021-12-28 22:52:56 +01:00
2021-12-28 22:52:56 +01:00
2021-12-28 22:52:56 +01:00
2021-12-28 22:52:56 +01:00
2021-12-28 22:52:56 +01:00
2021-12-28 22:52:56 +01:00
2021-12-28 22:52:56 +01:00
2021-12-28 22:52:56 +01:00
2021-12-28 22:52:56 +01:00
2022-01-01 11:40:24 -08:00
2022-01-07 13:21:57 +01:00
2022-01-17 09:58:27 +01:00
2022-05-23 10:38:40 -05:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-31 07:05:48 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-08-30 16:31:03 +02:00
2022-08-30 16:31:03 +02:00
2022-10-14 11:03:31 +02:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2023-10-02 15:40:33 -04:00
2022-01-01 11:40:24 -08:00
2021-10-20 13:38:50 +00:00
2021-10-20 13:38:50 +00:00
2021-10-20 13:38:50 +00:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2021-01-13 05:51:17 -08:00
2022-01-01 11:40:24 -08:00
2022-04-14 10:37:45 +02:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-04-22 10:58:32 +02:00
2022-01-24 05:11:36 -08:00
2022-01-24 05:11:36 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2020-01-09 20:47:19 +01:00
2023-02-08 18:21:51 +01:00
2022-01-01 11:40:24 -08:00
2017-12-15 20:22:29 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-05-27 12:34:49 -07:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-24 06:37:15 -08:00
2022-01-24 06:37:29 -08:00
2022-01-24 06:37:36 -08:00
2022-01-24 06:37:36 -08:00
2022-01-24 06:37:15 -08:00
2022-01-24 06:37:36 -08:00
2022-01-24 06:37:15 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-07-15 10:07:55 -03:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2025-01-11 08:19:41 -08:00
2025-01-11 08:19:41 -08:00
2025-01-11 08:19:41 -08:00
2022-04-26 10:16:11 -07:00
2022-04-26 10:16:11 -07:00
2022-04-26 10:16:11 -07:00
2022-04-26 10:16:11 -07:00
2022-04-26 10:16:11 -07:00
2022-04-26 10:16:11 -07:00
2022-04-26 10:16:11 -07:00
2022-04-26 10:16:11 -07:00
2022-04-26 10:16:11 -07:00
2022-04-26 10:16:11 -07:00
2022-04-26 10:16:11 -07:00
2022-04-22 10:59:03 +02:00
2022-01-01 11:40:24 -08:00
2021-09-22 11:12:43 -07:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2021-12-15 17:35:38 -03:00
2022-06-05 12:09:02 -07:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2019-06-28 10:15:38 +02:00
2022-01-01 11:40:24 -08:00
2019-06-28 10:15:38 +02:00
2022-01-01 11:40:24 -08:00
2019-06-28 10:15:38 +02:00
2024-08-01 16:59:26 +02:00
2022-01-01 11:40:24 -08:00
2017-09-30 01:39:32 -07:00
2021-08-16 09:59:30 -07:00
2021-08-16 09:59:30 -07:00
2022-01-01 11:40:24 -08:00
2021-04-15 09:30:43 +01:00
2022-01-01 11:40:24 -08:00
2021-05-11 17:16:37 +01:00
2022-05-16 18:42:03 +02:00
2022-01-01 11:40:24 -08:00
2020-07-08 17:32:56 +01:00
2020-07-08 17:32:56 +01:00
2020-07-08 17:32:56 +01:00
2020-07-08 17:32:56 +01:00
2020-07-08 17:32:56 +01:00
2020-07-08 17:32:56 +01:00
2020-07-08 17:32:56 +01:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2021-08-16 09:59:30 -07:00
2021-08-16 09:59:30 -07:00
2021-08-16 09:59:30 -07:00
2021-08-16 09:59:30 -07:00
2021-08-16 09:59:30 -07:00
2021-08-16 09:59:30 -07:00
2022-04-27 08:36:09 -03:00
2022-04-27 08:36:09 -03:00
2022-04-27 08:36:09 -03:00
2022-04-27 08:36:09 -03:00
2022-04-27 08:36:09 -03:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-22 17:31:16 +01:00
2022-01-22 17:31:16 +01:00
2022-04-26 10:16:11 -07:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00
2022-01-01 11:40:24 -08:00