This is the mail archive of the glibc-cvs@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]

GNU C Library master sources branch master updated. glibc-2.24-673-gd675eaf


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  d675eaf7d99096a952c1d140abfed82c939fb259 (commit)
      from  33d7e138ca63b4091bba840c609a95cdcc56c10e (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d675eaf7d99096a952c1d140abfed82c939fb259

commit d675eaf7d99096a952c1d140abfed82c939fb259
Author: Alexandre Oliva <aoliva@redhat.com>
Date:   Fri Feb 3 20:35:16 2017 -0500

    Bug 20915: Do not initialize DTV of other threads.
    
    In _dl_nothread_init_static_tls() and init_one_static_tls() we must not
    touch the DTV of other threads since we do not have ownership of them.
    The DTV need not be initialized at this point anyway since only LD/GD
    accesses will use them. If LD/GD accesses occur they will take care to
    initialize their own thread's DTV.
    
    Concurrency comments were removed from the patch since they need to be
    reworked along with a full description of DTV ownership and when it is
    or is not safe to modify these structures.
    
    Alexandre Oliva's original patch and discussion:
    https://sourceware.org/ml/libc-alpha/2016-09/msg00512.html

diff --git a/ChangeLog b/ChangeLog
index f70871d..9ed7ff6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2017-02-03  Alexandre Oliva  <aoliva@redhat.com>
+	    Florian Weimer  <fweimer@redhat.com>
+	    Carlos O'Donell  <carlos@redhat.com>
+
+	[BZ #20915]
+	* elf/dl-reloc.c (_dl_nothread_init_static_tls):
+	Do not initialize DTV.
+	* nptl/allocatestack.c (init_one_static_tls): Likewise.
+
 2017-02-03  David S. Miller  <davem@davemloft.net>
 
 	* sysdeps/sparc/sparc64/fpu/multiarch/s_fmax-vis3.S: Remove file.
diff --git a/elf/dl-reloc.c b/elf/dl-reloc.c
index 52311f0..4ac558d 100644
--- a/elf/dl-reloc.c
+++ b/elf/dl-reloc.c
@@ -137,12 +137,6 @@ _dl_nothread_init_static_tls (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 = THREAD_DTV ();
-  assert (map->l_tls_modid <= dtv[-1].counter);
-  dtv[map->l_tls_modid].pointer.to_free = NULL;
-  dtv[map->l_tls_modid].pointer.val = dest;
-
   /* Initialize the memory.  */
   memset (__mempcpy (dest, map->l_tls_initimage, map->l_tls_initimage_size),
 	  '\0', map->l_tls_blocksize - map->l_tls_initimage_size);
diff --git a/nptl/allocatestack.c b/nptl/allocatestack.c
index 6402ea4..8a228ab 100644
--- a/nptl/allocatestack.c
+++ b/nptl/allocatestack.c
@@ -1191,11 +1191,6 @@ 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.  */
   memset (__mempcpy (dest, map->l_tls_initimage, map->l_tls_initimage_size),
 	  '\0', map->l_tls_blocksize - map->l_tls_initimage_size);

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog            |    9 +++++++++
 elf/dl-reloc.c       |    6 ------
 nptl/allocatestack.c |    5 -----
 3 files changed, 9 insertions(+), 11 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


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