From 2ec0e7eade0ea1258acd5c6f5e5e9bfaeb5041a8 Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Wed, 24 Jan 2018 20:35:22 -0800 Subject: Revert Intel CET changes to __jmp_buf_tag (Bug 22743) In commit cba595c350e52194e10c0006732e1991e3d0803b and commit f81ddabffd76ac9dd600b02adbf3e1dac4bb10ec, ABI compatibility with applications was broken by increasing the size of the on-stack allocated __pthread_unwind_buf_t beyond the oringal size. Applications only have the origianl space available for __pthread_unwind_register, and __pthread_unwind_next to use, any increase in the size of __pthread_unwind_buf_t causes these functions to write beyond the original structure into other on-stack variables leading to segmentation faults in common applications like vlc. The only workaround is to version those functions which operate on the old sized objects, but this must happen in glibc 2.28. Thank you to Andrew Senkevich, H.J. Lu, and Aurelien Jarno, for submitting reports and tracking the issue down. The commit reverts the above mentioned commits and testing on x86_64 shows that the ABI compatibility is restored. A tst-cleanup1 regression test linked with an older glibc now passes when run with the newly built glibc. Previously a tst-cleanup1 linked with an older glibc would segfault when run with an affected glibc build. Tested on x86_64 with no regressions. Signed-off-by: Carlos O'Donell --- sysdeps/i386/nptl/tcb-offsets.sym | 1 - sysdeps/i386/nptl/tls.h | 4 ---- 2 files changed, 5 deletions(-) (limited to 'sysdeps/i386') diff --git a/sysdeps/i386/nptl/tcb-offsets.sym b/sysdeps/i386/nptl/tcb-offsets.sym index 250f1a6..695a810 100644 --- a/sysdeps/i386/nptl/tcb-offsets.sym +++ b/sysdeps/i386/nptl/tcb-offsets.sym @@ -15,4 +15,3 @@ 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) diff --git a/sysdeps/i386/nptl/tls.h b/sysdeps/i386/nptl/tls.h index 30643d4..fcda135 100644 --- a/sysdeps/i386/nptl/tls.h +++ b/sysdeps/i386/nptl/tls.h @@ -50,10 +50,6 @@ typedef struct void *__private_tm[4]; /* GCC split stack support. */ void *__private_ss; - /* Bit 0: IBT. - Bit 1: SHSTK. - */ - unsigned int feature_1; } tcbhead_t; # define TLS_MULTIPLE_THREADS_IN_TCB 1 -- cgit v1.1