This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: 2.25 freeze status


On 01/27/2017 05:27 PM, Szabolcs Nagy wrote:
On 27/01/17 07:47, Florian Weimer wrote:
On 01/27/2017 05:06 AM, Siddhesh Poyarekar wrote:
Hi,

The release date of 1 Feb is upon us and there are 3 release blockers
that haven't been resolved yet:

- global-dynamic TLS broken on aarch64 and others

Fix is known (revert part of a faulty commit), it just needs review.

i think the hunk mentioned in
https://sourceware.org/bugzilla/show_bug.cgi?id=20915
should be just reverted without further review.

writing to the dtv of other threads is neither
necessary nor correct.

Let's do it then.  Is this patch okay?

Thanks,
Florian

nptl: Do not overwrite the DTV of other threads [BZ #20915]

This reverts part of commit 17af5da98cd2c9ec958421ae2108f877e0945451.

2017-01-27  Florian Weimer  <fweimer@redhat.com>

	[BZ #20915]
	* nptl/allocatestack.c (init_one_static_tls): Do not write to the
	DTV of other threads.

diff --git a/nptl/allocatestack.c b/nptl/allocatestack.c
index 6402ea4..18d2001 100644
--- a/nptl/allocatestack.c
+++ b/nptl/allocatestack.c
@@ -1191,12 +1191,9 @@ init_one_static_tls (struct pthread *curp, struct link_map *map)
 #  error "Either TLS_TCB_AT_TP or TLS_DTV_AT_TP must be defined"
 # endif
 
-  /* Fill in the DTV slot so that a later LD/GD access will find it.  */
-  dtv_t *dtv = GET_DTV (TLS_TPADJ (curp));
-  dtv[map->l_tls_modid].pointer.to_free = NULL;
-  dtv[map->l_tls_modid].pointer.val = dest;
-
-  /* Initialize the memory.  */
+  /* We cannot delay the initialization of the Static TLS area, since
+     it can be accessed with LE or IE, but since the DTV is only used
+     by GD and LD, we can delay its update to avoid a race.  */
   memset (__mempcpy (dest, map->l_tls_initimage, map->l_tls_initimage_size),
 	  '\0', map->l_tls_blocksize - map->l_tls_initimage_size);
 }

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]