mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-30 08:40:07 +00:00
9aa3113a42
This will be used to record the current shadow stack base for shadow stack switching by getcontext, makecontext, setcontext and swapcontext. If the target shadow stack base is the same as the current shadow stack base, we unwind the shadow stack. Otherwise it is a stack switch and we look for a restore token to restore the target shadow stack. * sysdeps/i386/nptl/tcb-offsets.sym (SSP_BASE_OFFSET): New. * sysdeps/i386/nptl/tls.h (tcbhead_t): Replace __glibc_reserved2 with ssp_base. * sysdeps/x86_64/nptl/tcb-offsets.sym (SSP_BASE_OFFSET): New. * sysdeps/x86_64/nptl/tls.h (tcbhead_t): Replace __glibc_reserved2 with ssp_base.
17 lines
686 B
Plaintext
17 lines
686 B
Plaintext
#include <sysdep.h>
|
|
#include <tls.h>
|
|
#include <kernel-features.h>
|
|
|
|
RESULT offsetof (struct pthread, result)
|
|
TID offsetof (struct pthread, tid)
|
|
CANCELHANDLING offsetof (struct pthread, cancelhandling)
|
|
CLEANUP_JMP_BUF offsetof (struct pthread, cleanup_jmp_buf)
|
|
MULTIPLE_THREADS_OFFSET offsetof (tcbhead_t, multiple_threads)
|
|
SYSINFO_OFFSET offsetof (tcbhead_t, sysinfo)
|
|
CLEANUP offsetof (struct pthread, cleanup)
|
|
CLEANUP_PREV offsetof (struct _pthread_cleanup_buffer, __prev)
|
|
MUTEX_FUTEX offsetof (pthread_mutex_t, __data.__lock)
|
|
POINTER_GUARD offsetof (tcbhead_t, pointer_guard)
|
|
FEATURE_1_OFFSET offsetof (tcbhead_t, feature_1)
|
|
SSP_BASE_OFFSET offsetof (tcbhead_t, ssp_base)
|