diff options
author | nwhitehorn <nwhitehorn@FreeBSD.org> | 2012-04-11 00:00:40 +0000 |
---|---|---|
committer | nwhitehorn <nwhitehorn@FreeBSD.org> | 2012-04-11 00:00:40 +0000 |
commit | 5ff92b1d9cf05d81d6ba6e43fbac5f0e1005df63 (patch) | |
tree | fa4399d543adb338238e40a89c2c950e43bc75b5 /lib/libc/powerpc64 | |
parent | f0d73b67412f77f8ec067ccb7e25190dce1a3a14 (diff) | |
download | FreeBSD-src-5ff92b1d9cf05d81d6ba6e43fbac5f0e1005df63.zip FreeBSD-src-5ff92b1d9cf05d81d6ba6e43fbac5f0e1005df63.tar.gz |
Do not restore the register holding the TLS pointer when doing various
usermode context switches (long jumps and ucontext operations). If these
are used across threads, multiple threads can end up with the same TLS base.
Madness will then result.
This makes behavior on PPC match that on x86 systems and on Linux.
MFC after: 10 days
Diffstat (limited to 'lib/libc/powerpc64')
-rw-r--r-- | lib/libc/powerpc64/gen/_setjmp.S | 1 | ||||
-rw-r--r-- | lib/libc/powerpc64/gen/setjmp.S | 1 | ||||
-rw-r--r-- | lib/libc/powerpc64/gen/sigsetjmp.S | 1 |
3 files changed, 0 insertions, 3 deletions
diff --git a/lib/libc/powerpc64/gen/_setjmp.S b/lib/libc/powerpc64/gen/_setjmp.S index a5c247d..ac0555e 100644 --- a/lib/libc/powerpc64/gen/_setjmp.S +++ b/lib/libc/powerpc64/gen/_setjmp.S @@ -86,7 +86,6 @@ ENTRY(_longjmp) ld %r10,40 + 1*8(%r3) ld %r11,40 + 2*8(%r3) ld %r12,40 + 3*8(%r3) - ld %r13,40 + 4*8(%r3) ld %r14,40 + 5*8(%r3) ld %r15,40 + 6*8(%r3) ld %r16,40 + 7*8(%r3) diff --git a/lib/libc/powerpc64/gen/setjmp.S b/lib/libc/powerpc64/gen/setjmp.S index deda7c5..8fe2852 100644 --- a/lib/libc/powerpc64/gen/setjmp.S +++ b/lib/libc/powerpc64/gen/setjmp.S @@ -99,7 +99,6 @@ ENTRY(__longjmp) ld %r10,40 + 1*8(%r3) ld %r11,40 + 2*8(%r3) ld %r12,40 + 3*8(%r3) - ld %r13,40 + 4*8(%r3) ld %r14,40 + 5*8(%r3) ld %r15,40 + 6*8(%r3) ld %r16,40 + 7*8(%r3) diff --git a/lib/libc/powerpc64/gen/sigsetjmp.S b/lib/libc/powerpc64/gen/sigsetjmp.S index 7b50f9f..d5341ea 100644 --- a/lib/libc/powerpc64/gen/sigsetjmp.S +++ b/lib/libc/powerpc64/gen/sigsetjmp.S @@ -103,7 +103,6 @@ ENTRY(siglongjmp) ld %r10,40 + 1*8(%r3) ld %r11,40 + 2*8(%r3) ld %r12,40 + 3*8(%r3) - ld %r13,40 + 4*8(%r3) ld %r14,40 + 5*8(%r3) ld %r15,40 + 6*8(%r3) ld %r16,40 + 7*8(%r3) |