diff options
| author | Florian Weimer <fweimer@redhat.com> | 2024-12-19 20:56:44 +0100 |
|---|---|---|
| committer | Florian Weimer <fweimer@redhat.com> | 2024-12-19 21:21:30 +0100 |
| commit | 30d3fd7f4f4bc8f767d73ad4e4b005c1bd234310 (patch) | |
| tree | 51274e32543d74107da3ecc2e7cd3ff77613e0ef /sysdeps/x86_64 | |
| parent | d7f587398cfda79a48cde94a38c4eee660781d30 (diff) | |
| download | glibc-30d3fd7f4f4bc8f767d73ad4e4b005c1bd234310.tar.xz glibc-30d3fd7f4f4bc8f767d73ad4e4b005c1bd234310.zip | |
x86_64: Remove unused padding from tcbhead_t
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.
Due to the removal of the padding, the assert for its start
is no longer required.
Reviewed-by: Noah Goldstein <goldstein.w.n@gmail.com>
Diffstat (limited to 'sysdeps/x86_64')
| -rw-r--r-- | sysdeps/x86_64/nptl/tls.h | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/sysdeps/x86_64/nptl/tls.h b/sysdeps/x86_64/nptl/tls.h index 876889bed4..837ffcc2bb 100644 --- a/sysdeps/x86_64/nptl/tls.h +++ b/sysdeps/x86_64/nptl/tls.h @@ -62,28 +62,16 @@ typedef struct void *__private_ss; /* The marker for the current shadow stack. */ unsigned long long int ssp_base; - /* Must be kept even if it is no longer used by glibc since programs, - like AddressSanitizer, depend on the size of tcbhead_t. */ - __128bits __glibc_unused2[8][4] __attribute__ ((aligned (32))); - - void *__padding[8]; } tcbhead_t; # ifdef __ILP32__ /* morestack.S in libgcc uses offset 0x40 to access __private_ss, */ _Static_assert (offsetof (tcbhead_t, __private_ss) == 0x40, "offset of __private_ss != 0x40"); -/* NB: ssp_base used to be "long int __glibc_reserved2", which was - changed from 32 bits to 64 bits. Make sure that the offset of the - next field, __glibc_unused2, is unchanged. */ -_Static_assert (offsetof (tcbhead_t, __glibc_unused2) == 0x60, - "offset of __glibc_unused2 != 0x60"); # else /* morestack.S in libgcc uses offset 0x70 to access __private_ss, */ _Static_assert (offsetof (tcbhead_t, __private_ss) == 0x70, "offset of __private_ss != 0x70"); -_Static_assert (offsetof (tcbhead_t, __glibc_unused2) == 0x80, - "offset of __glibc_unused2 != 0x80"); # endif #else /* __ASSEMBLER__ */ |
