git: DragonFly_RELEASE_6_4 rtld - do not allow both dynamic DTV index and static TLS offset

Aaron LI aly at crater.dragonflybsd.org
Tue Mar 18 18:12:13 PDT 2025


commit 08561eb31d0ba3523e162490d098a15b68824bad
Author: Sergey Zigachev <szi at dragonflybsd.org>
Date:   Tue Oct 22 13:00:23 2024 +0500

    rtld - do not allow both dynamic DTV index and static TLS offset
    
    * If we are allocating static offset for an object with dynamic index,
      return failure. In the opposite case, if dynamic index is requested for
      statically allocated TLS area, directly use the offset instead of
      setting the index.
      Taken from FreeBSD, commit 91880e07f605edb90339685bc934699a4344de3b.
    
    * While there, fix dtv timing race between threads.
    
    Co-authored-by: Matthew Dillon <dillon at apollo.backplane.com>
    Reported-by: Stephane Russell <srussell at prodigeinfo.qc.ca>

Summary of changes:
 libexec/rtld-elf/map_object.c   |  2 +-
 libexec/rtld-elf/rtld.c         | 26 +++++++++++++++++++++-----
 libexec/rtld-elf/rtld.h         |  3 ++-
 libexec/rtld-elf/x86_64/reloc.c |  4 ++--
 4 files changed, 26 insertions(+), 9 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/08561eb31d0ba3523e162490d098a15b68824bad


-- 
DragonFly BSD source repository


More information about the Commits mailing list