glibc/sysdeps/unix/sysv/linux/x86
H.J. Lu faaee1f07e x86: Support shadow stack pointer in setjmp/longjmp
Save and restore shadow stack pointer in setjmp and longjmp to support
shadow stack in Intel CET.  Use feature_1 in tcbhead_t to check if
shadow stack is enabled before saving and restoring shadow stack pointer.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>

	* sysdeps/i386/__longjmp.S: Include <jmp_buf-ssp.h>.
	(__longjmp): Restore shadow stack pointer if shadow stack is
	enabled, SHADOW_STACK_POINTER_OFFSET is defined and __longjmp
	isn't defined for __longjmp_cancel.
	* sysdeps/i386/bsd-_setjmp.S: Include <jmp_buf-ssp.h>.
	(_setjmp): Save shadow stack pointer if shadow stack is enabled
	and SHADOW_STACK_POINTER_OFFSET is defined.
	* sysdeps/i386/bsd-setjmp.S: Include <jmp_buf-ssp.h>.
	(setjmp): Save shadow stack pointer if shadow stack is enabled
	and SHADOW_STACK_POINTER_OFFSET is defined.
	* sysdeps/i386/setjmp.S: Include <jmp_buf-ssp.h>.
	(__sigsetjmp): Save shadow stack pointer if shadow stack is
	enabled and SHADOW_STACK_POINTER_OFFSET is defined.
	* sysdeps/unix/sysv/linux/i386/____longjmp_chk.S: Include
	<jmp_buf-ssp.h>.
	(____longjmp_chk): Restore shadow stack pointer if shadow stack
	is enabled and SHADOW_STACK_POINTER_OFFSET is defined.
	* sysdeps/unix/sysv/linux/x86/Makefile (gen-as-const-headers):
	Remove jmp_buf-ssp.sym.
	* sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S: Include
	<jmp_buf-ssp.h>.
	(____longjmp_chk): Restore shadow stack pointer if shadow stack
	is enabled and SHADOW_STACK_POINTER_OFFSET is defined.
	* sysdeps/x86/Makefile (gen-as-const-headers): Add
	jmp_buf-ssp.sym.
	* sysdeps/x86/jmp_buf-ssp.sym: New dummy file.
	* sysdeps/x86_64/__longjmp.S: Include <jmp_buf-ssp.h>.
	(__longjmp): Restore shadow stack pointer if shadow stack is
	enabled, SHADOW_STACK_POINTER_OFFSET is defined and __longjmp
	isn't defined for __longjmp_cancel.
	* sysdeps/x86_64/setjmp.S: Include <jmp_buf-ssp.h>.
	(__sigsetjmp): Save shadow stack pointer if shadow stack is
	enabled and SHADOW_STACK_POINTER_OFFSET is defined.
2018-07-14 05:59:53 -07:00
..
bits Add SHM_STAT_ANY from Linux 4.17 to bits/shm.h. 2018-06-18 13:37:57 +00:00
sys Add PTRACE_SECCOMP_GET_METADATA from Linux 4.16 to sys/ptrace.h. 2018-04-24 12:11:35 +00:00
arch-pkey.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
dl-sysdep.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
elision-conf.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
elision-conf.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
elision-lock.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
elision-timed.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
elision-trylock.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
elision-unlock.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
force-elision.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
gettimeofday.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
hle.h Move remaining files out of nptl/sysdeps/unix/sysv/linux/x86/. 2014-05-14 15:32:18 -07:00
Implies Consolidate pthreadtype.h placementConsolidate pthreadtype.h placement 2017-04-10 17:33:10 -03:00
jmp_buf-ssp.sym x86: Make a space in jmpbuf for shadow stack pointer 2017-11-30 04:58:01 -08:00
libc-vdso.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
Makefile x86: Support shadow stack pointer in setjmp/longjmp 2018-07-14 05:59:53 -07:00
pkey_get.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
pkey_set.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
pthread_mutex_cond_lock.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
pthread_mutex_lock.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
pthread_mutex_timedlock.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
pthread_mutex_trylock.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
setjmpP.h x86: Use pad in pthread_unwind_buf to preserve shadow stack register 2018-05-02 06:17:41 -07:00
sysconf.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
time.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
tst-saved_mask-1.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00