about summary refs log tree commit diff
path: root/sysdeps/i386/nptl/tcb-offsets.sym
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2017-12-19 02:45:16 -0800
committerH.J. Lu <hjl.tools@gmail.com>2017-12-19 02:45:34 -0800
commitcba595c350e52194e10c0006732e1991e3d0803b (patch)
tree833da57e0eae667c21ce447aa9502a64e3c05527 /sysdeps/i386/nptl/tcb-offsets.sym
parentf81ddabffd76ac9dd600b02adbf3e1dac4bb10ec (diff)
downloadglibc-cba595c350e52194e10c0006732e1991e3d0803b.tar.gz
glibc-cba595c350e52194e10c0006732e1991e3d0803b.tar.xz
glibc-cba595c350e52194e10c0006732e1991e3d0803b.zip
x86: Add feature_1 to tcbhead_t [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.
cancel_jmp_buf has been updated to include saved_mask so that it is as
large as struct __jmp_buf_tag.  We must suport the old cancel_jmp_buf
in existing binaries.  Since symbol versioning doesn't work on
cancel_jmp_buf, feature_1 is added to tcbhead_t so that setjmp and
longjmp can check if shadow stack is enabled.  NB: Shadow stack is
enabled only if all modules are shadow stack enabled.

	[BZ #22563]
	* sysdeps/i386/nptl/tcb-offsets.sym (FEATURE_1_OFFSET): New.
	* sysdeps/i386/nptl/tls.h (tcbhead_t): Add feature_1.
	* sysdeps/x86_64/nptl/tcb-offsets.sym (FEATURE_1_OFFSET): New.
	* sysdeps/x86_64/nptl/tls.h (tcbhead_t): Rename __glibc_unused1
	to feature_1.
Diffstat (limited to 'sysdeps/i386/nptl/tcb-offsets.sym')
-rw-r--r--sysdeps/i386/nptl/tcb-offsets.sym1
1 files changed, 1 insertions, 0 deletions
diff --git a/sysdeps/i386/nptl/tcb-offsets.sym b/sysdeps/i386/nptl/tcb-offsets.sym
index 695a810386..250f1a6e13 100644
--- a/sysdeps/i386/nptl/tcb-offsets.sym
+++ b/sysdeps/i386/nptl/tcb-offsets.sym
@@ -15,3 +15,4 @@ POINTER_GUARD		offsetof (tcbhead_t, pointer_guard)
 #ifndef __ASSUME_PRIVATE_FUTEX
 PRIVATE_FUTEX		offsetof (tcbhead_t, private_futex)
 #endif
+FEATURE_1_OFFSET	offsetof (tcbhead_t, feature_1)