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

[Bug libc/24606] Dynamic TLS address is not congruent with p_vaddr when (p_vaddr % p_align != 0)


https://sourceware.org/bugzilla/show_bug.cgi?id=24606

Szabolcs Nagy <nsz at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2019-05-24
     Ever confirmed|0                           |1

--- Comment #7 from Szabolcs Nagy <nsz at gcc dot gnu.org> ---
sorry somehow i missed that we are talking about dynamic tls and i was
looking at the static tls code.

indeed the dynamic tls code does not access the l_tls_firstbyte_offset,
only alignment and size are passed to allocate_dtv_entry.

i guess there were historical linkers that produced p_vaddr % p_align != 0
for static tls, but not for dynamic tls or the dynamic tls case were not
visible because affected targets supported unaligned access, so it was only
fixed in the static tls case. (with local exec tls the runtime tp offset
must match the value computed by the static linker, there is no such
requirement in the dynamic case, so if the user code does not care about
alignment then wrong alignment works.)

i assume nowadays linkers ensure the beginning of the tls block is aligned,
so it's not an issue in practice, but still an ELF TLS correctness issue.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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