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
..
2004-09-20 00:16:11 +00:00
2004-09-20 00:16:11 +00:00
2004-09-20 00:16:11 +00:00
2004-09-20 00:16:11 +00:00
2004-09-20 00:16:11 +00:00
2004-09-20 00:16:11 +00:00
2004-09-20 00:16:11 +00:00
2004-09-20 00:16:11 +00:00
2014-05-07 14:00:01 +02:00
2007-05-15 06:49:29 +00:00
2003-09-29 22:23:14 +00:00
2003-02-15 22:50:01 +00:00
2003-07-22 23:10:17 +00:00
2002-12-14 19:49:13 +00:00
2003-12-20 06:34:59 +00:00
2003-06-08 05:28:14 +00:00
2003-06-08 05:28:14 +00:00
2003-06-08 05:28:14 +00:00
2003-06-08 05:28:14 +00:00
2003-06-08 05:28:14 +00:00
2003-06-08 05:28:14 +00:00
2003-06-08 05:28:14 +00:00
2003-06-08 05:28:14 +00:00
2003-06-08 05:28:14 +00:00
2003-06-08 05:28:14 +00:00
2003-06-08 05:28:14 +00:00
2003-06-08 05:28:14 +00:00
2003-06-08 05:28:14 +00:00
2003-06-08 05:28:14 +00:00
2003-06-08 05:28:14 +00:00
2003-06-16 07:39:03 +00:00
2003-06-17 22:11:22 +00:00
2003-06-17 22:40:05 +00:00
2003-12-19 01:37:13 +00:00
2003-12-19 01:37:13 +00:00
2003-06-08 05:28:14 +00:00
2003-06-08 05:28:14 +00:00
2003-06-08 05:28:14 +00:00
2003-06-08 05:28:14 +00:00
2003-06-08 05:28:14 +00:00
2003-11-06 04:29:42 +00:00
2017-08-09 10:47:33 +02:00
2003-11-21 09:25:26 +00:00
2004-05-18 20:18:14 +00:00
2004-09-02 18:59:24 +00:00
2003-02-27 04:42:04 +00:00
2003-09-24 08:33:01 +00:00
2006-08-13 01:56:09 +00:00
2004-03-24 06:36:06 +00:00
2017-12-05 17:48:48 -02:00
2011-10-24 21:43:33 -04:00
2003-07-01 03:29:50 +00:00
2003-07-01 03:29:50 +00:00
2017-07-06 17:01:03 +00:00
2008-05-31 08:56:14 +00:00
2017-07-06 17:01:03 +00:00
2007-05-26 01:23:04 +00:00
2004-11-12 01:27:04 +00:00
2003-09-02 00:33:28 +00:00
2003-09-02 00:33:28 +00:00
2003-09-02 00:33:28 +00:00
2003-09-02 00:33:28 +00:00
2003-09-02 00:33:28 +00:00
2003-09-02 00:33:28 +00:00
2003-09-02 00:33:28 +00:00
2007-08-21 23:55:36 +00:00
2004-03-10 05:25:48 +00:00
2004-03-10 05:25:48 +00:00
2004-03-10 05:25:48 +00:00
2004-03-10 05:25:48 +00:00
2017-09-21 17:49:51 +00:00