musl/arch/x32
Rich Felker 484194dbf4 fix stack protector crashes on x32 & powerpc due to misplaced TLS canary
i386, x86_64, x32, and powerpc all use TLS for stack protector canary
values in the default stack protector ABI, but the location only
matched the ABI on i386 and x86_64. on x32, the expected location for
the canary contained the tid, thus producing spurious mismatches
(resulting in process termination) upon fork. on powerpc, the expected
location contained the stdio_locks list head, so returning from a
function after calling flockfile produced spurious mismatches. in both
cases, the random canary was not present, and a predictable value was
used instead, making the stack protector hardening much less effective
than it should be.

in the current fix, the thread structure has been expanded to have
canary fields at all three possible locations, and archs that use a
non-default location must define a macro in pthread_arch.h to choose
which location is used. for most archs (which lack TLS canary ABI) the
choice does not matter.
2015-05-06 18:37:19 -04:00
..
bits move O_PATH definition back to arch bits 2015-04-01 19:31:06 -04:00
src fix dangling pointers in x32 syscall timespec fixup code 2015-05-01 21:22:27 -04:00
atomic.h add explicit barrier operation to internal atomic.h API 2014-10-10 18:17:09 -04:00
crt_arch.h dynamic linker bootstrap overhaul 2015-04-13 03:04:42 -04:00
pthread_arch.h fix stack protector crashes on x32 & powerpc due to misplaced TLS canary 2015-05-06 18:37:19 -04:00
reloc.h fix breakage in x32 dynamic linker due to mismatching register size 2015-04-20 18:17:48 -04:00
syscall_arch.h fix dangling pointers in x32 syscall timespec fixup code 2015-05-01 21:22:27 -04:00