History log of /seL4-refos-master/libs/libmuslc/arch/x32/pthread_arch.h
Revision Date Author Comments
# cb1bf2f3 01-Nov-2015 Rich Felker <dalias@aerifal.cx>

properly access mcontext_t program counter in cancellation handler

using the actual mcontext_t definition rather than an overlaid pointer
array both improves correctness/readability and eliminates some ugly
hacks for archs with 64-bit registers bit 32-bit program counter.

also fix UB due to comparison of pointers not in a common array
object.


# 484194db 06-May-2015 Rich Felker <dalias@aerifal.cx>

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.


# 7fe273b2 01-May-2015 Rich Felker <dalias@aerifal.cx>

fix broken cancellation on x32 due to incorrect saved-PC offset


# 323272db 07-Jan-2014 rofl0r <retnyg@gmx.net>

import vanilla x86_64 code as x32