glibc/sysdeps/unix/sysv/linux/hppa
H.J. Lu f81ddabffd Linux/x86: Update cancel_jmp_buf to match __jmp_buf_tag [BZ #22563]
On x86, padding in struct __jmp_buf_tag is used for shadow stack pointer
to support shadow stack in Intel Control-flow Enforcemen Technology.
Since the cancel_jmp_buf array is passed to setjmp and longjmp by
casting it to pointer to struct __jmp_buf_tag, it should be as large
as struct __jmp_buf_tag.  Otherwise when shadow stack is enabled,
setjmp and longjmp will write and read beyond cancel_jmp_buf when saving
and restoring shadow stack pointer.

This patch adds bits/types/__cancel_jmp_buf_tag.h to define struct
__cancel_jmp_buf_tag so that Linux/x86 can add saved_mask to
cancel_jmp_buf.

Tested natively on i386, x86_64 and x32.  Tested hppa-linux-gnu with
build-many-glibcs.py.

	[BZ #22563]
	* bits/types/__cancel_jmp_buf_tag.h: New file.
	* sysdeps/unix/sysv/linux/x86/bits/types/__cancel_jmp_buf_tag.h
	* sysdeps/unix/sysv/linux/x86/pthreaddef.h: Likewise.
	* sysdeps/unix/sysv/linux/x86/nptl/pthreadP.h: Likewise.
	* nptl/Makefile (headers): Add
	bits/types/__cancel_jmp_buf_tag.h.
	* nptl/descr.h [NEED_SAVED_MASK_IN_CANCEL_JMP_BUF]
	(pthread_unwind_buf): Add saved_mask to cancel_jmp_buf.
	* sysdeps/nptl/pthread.h: Include
	<bits/types/__cancel_jmp_buf_tag.h>.
	(__pthread_unwind_buf_t): Use struct __cancel_jmp_buf_tag with
	__cancel_jmp_buf.
	* sysdeps/unix/sysv/linux/hppa/pthread.h: Likewise.
2017-12-19 02:44:04 -08:00
..
bits Linux: Introduce <bits/mman-shared.h> 2017-11-24 17:55:59 +01:00
sys Fix mcontext_t sigcontext namespace (bug 21457). 2017-08-30 22:02:04 +00:00
____longjmp_chk.c Fix struct sigaltstack namespace (bug 21517). 2017-06-05 10:17:46 +00:00
arch-fork.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
atomic-machine.h Optimize generic spinlock code and use C11 like atomic macros. 2017-06-06 09:41:56 +02:00
brk.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
c++-types.data
clone.S hppa: Fix clone exit syscall argument passing (BZ#21512) 2017-07-17 14:25:40 -03:00
fxstat.c
fxstatat.c
getcontext.S Fix return pointer save and PIC register restore in __getcontext and 2017-10-01 11:58:04 -04:00
getdents64.c
Implies
ipc_priv.h hppa: set __IPC_64 as zero for SysV IPC calls 2017-03-07 09:12:48 +01:00
jmp_buf-macros.h Add jmp_buf-macros.h 2017-11-09 05:10:03 -08:00
kernel_sigaction.h
kernel_stat.h
kernel-features.h Use execveat syscall in fexecve (bug 22134) 2017-09-19 16:19:14 +02:00
ld.abilist
libanl.abilist
libBrokenLocale.abilist
libc.abilist Add _Float32 function aliases. 2017-12-07 00:48:31 +00:00
libcrypt.abilist
libdl.abilist
libm.abilist Add _Float32 function aliases. 2017-12-07 00:48:31 +00:00
libnsl.abilist
libpthread.abilist
libresolv.abilist
librt.abilist
libthread_db.abilist
libutil.abilist
localplt.data ld.so: Introduce struct dl_exception 2017-08-10 16:54:57 +02:00
lxstat.c
makecontext.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
Makefile
profil-counter.h Rename struct ucontext tag (bug 21457). 2017-06-26 22:03:58 +00:00
pt-vfork.S Add CFI annotation. 2017-07-16 12:46:50 -04:00
pthread.h Linux/x86: Update cancel_jmp_buf to match __jmp_buf_tag [BZ #22563] 2017-12-19 02:44:04 -08:00
pthreadP.h
setcontext.S Fix return pointer save and PIC register restore in __getcontext and 2017-10-01 11:58:04 -04:00
shlib-versions
swapcontext.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
syscall.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
syscalls.list Consolidate Linux send implementation 2017-03-09 15:22:06 +01:00
sysdep.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
sysdep.h Linux: Consolidate {RTLD_}SINGLE_THREAD_P definition 2017-10-11 14:27:24 -03:00
ucontext_i.sym
umount.c
utimes.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
Versions
xstat.c