aboutsummaryrefslogtreecommitdiff
path: root/ChangeLog
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2018-07-14 05:59:29 -0700
committerH.J. Lu <hjl.tools@gmail.com>2018-07-14 05:59:53 -0700
commitfaaee1f07ed25b2779bfd935ffb29f431b80d6d3 (patch)
tree3c85f88e2312c67e0f0e54be10b0bec833c7541f /ChangeLog
parentebff9c5cfae62e84dbd0456d564bd882818dc15f (diff)
downloadglibc-faaee1f07ed25b2779bfd935ffb29f431b80d6d3.tar
glibc-faaee1f07ed25b2779bfd935ffb29f431b80d6d3.tar.gz
glibc-faaee1f07ed25b2779bfd935ffb29f431b80d6d3.tar.bz2
glibc-faaee1f07ed25b2779bfd935ffb29f431b80d6d3.zip
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.
Diffstat (limited to 'ChangeLog')
-rw-r--r--ChangeLog37
1 files changed, 37 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index e5eead0f0f..c9844826b0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,40 @@
+2018-07-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
+ H.J. Lu <hongjiu.lu@intel.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 H.J. Lu <hongjiu.lu@intel.com>
[BZ #22563]