[PATCH] x86_64: Remove unused padding from tcbhead_t

Florian Weimer fweimer@redhat.com
Wed Dec 18 17:27:49 GMT 2024


* Noah Goldstein:

> On Tue, Dec 17, 2024 at 2:15 AM Florian Weimer <fweimer@redhat.com> wrote:
>>
>> This padding is difficult to use for preserving the internal
>> GLIBC_PRIVATE ABI.  The comment is misleading.  Current Address
>> Sanitizer uses heuristics to determine struct pthread size.
>> It does not depend on its precise layout.  It merely scans for
>> pointers allocated using malloc.
>>
> Can you expand on the motivation for this? Without a compelling reason
> at least, I don't really see the point of taking the risk that this
> breaks something.

The large size of tcbhead_t makes the existing extension padding in
struct pthread unusable.  See this related (but structurally
independent) patch:

  [PATCH] nptl: More useful padding in struct pthread
  <https://inbox.sourceware.org/libc-alpha/875xniwtwt.fsf@oldenburg.str.redhat.com/>

Fixing that requires changing struct pthread layout, which means that we
might as well get rid of the historic baggage in x86-64 tcbhead_t at the
same time.

Thanks,
Florian



More information about the Libc-alpha mailing list