glibc/sysdeps/x86_64
H.J. Lu 541641a3de x86/cet: Enable shadow stack during startup
Previously, CET was enabled by kernel before passing control to user
space and the startup code must disable CET if applications or shared
libraries aren't CET enabled.  Since the current kernel only supports
shadow stack and won't enable shadow stack before passing control to
user space, we need to enable shadow stack during startup if the
application and all shared library are shadow stack enabled.  There
is no need to disable shadow stack at startup.  Shadow stack can only
be enabled in a function which will never return.  Otherwise, shadow
stack will underflow at the function return.

1. GL(dl_x86_feature_1) is set to the CET features which are supported
by the processor and are not disabled by the tunable.  Only non-zero
features in GL(dl_x86_feature_1) should be enabled.  After enabling
shadow stack with ARCH_SHSTK_ENABLE, ARCH_SHSTK_STATUS is used to check
if shadow stack is really enabled.
2. Use ARCH_SHSTK_ENABLE in RTLD_START in dynamic executable.  It is
safe since RTLD_START never returns.
3. Call arch_prctl (ARCH_SHSTK_ENABLE) from ARCH_SETUP_TLS in static
executable.  Since the start function using ARCH_SETUP_TLS never returns,
it is safe to enable shadow stack in ARCH_SETUP_TLS.
2024-01-01 05:22:48 -08:00
..
64 elf: Ignore GLIBC_TUNABLES for setuid/setgid binaries 2023-11-21 16:15:42 -03:00
fpu x86: Do not raises floating-point exception traps on fesetexceptflag (BZ 30990) 2023-12-19 15:12:38 -03:00
htl htl: Add tcb-offsets.sym for x86_64 2023-04-03 01:15:30 +02:00
multiarch x86: Unifies 'strlen-evex' and 'strlen-evex512' implementations. 2023-12-18 12:38:01 -06:00
nptl x86/cet: Sync with Linux kernel 6.6 shadow stack interface 2024-01-01 05:22:48 -08:00
sys hurd: Drop REG_GSFS and REG_ESDS from x86_64's ucontext 2023-09-28 00:10:13 +02:00
x32 Parameterize op_t from memcopy.h 2023-02-06 16:19:35 -03:00
____longjmp_chk.S
__longjmp.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
_mcount.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
abort-instr.h
add_n.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
addmul_1.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
bsd-_setjmp.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
bsd-setjmp.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
configure configure: Use autoconf 2.71 2023-07-17 10:08:10 -04:00
configure.ac
crti.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
crtn.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
dl-cache.h x86: Make dl-cache.h and readelflib.c not Linux-specific 2023-06-26 10:04:31 -03:00
dl-hwcaps-subdirs.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
dl-irel.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
dl-machine.h x86/cet: Enable shadow stack during startup 2024-01-01 05:22:48 -08:00
dl-procinfo.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
dl-runtime.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
dl-tls.c elf: Fix slow tls access after dlopen [BZ #19924] 2023-09-01 08:21:37 +01:00
dl-tls.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
dl-tlsdesc.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
dl-tlsdesc.S x86-64: Fix the tcb field load for x32 [BZ #31185] 2023-12-22 05:37:17 -08:00
dl-trampoline.h Fix misspellings in sysdeps/x86_64 -- BZ 25337. 2023-05-23 10:25:11 +00:00
dl-trampoline.S elf: Remove LD_PROFILE for static binaries 2023-11-21 16:15:42 -03:00
ffs.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
ffsll.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
ifuncmain8.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
ifuncmod8.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
Implies
isa-default-impl.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
isa.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
jmpbuf-offsets.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
jmpbuf-unwind.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
l10nflist.c
link-defines.sym
locale-defines.sym
localplt.data
lshift.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
machine-gmon.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
Makefile nptl: move tst-x86-64-tls-1 to nptl-only tests 2023-05-01 12:59:33 +02:00
memchr.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
memcmp.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
memcmpeq.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
memcpy_chk.S string: Ensure *_chk routines have their hidden builtin definition available 2023-07-05 16:59:48 +02:00
memcpy.S x86_64: Fix build with --disable-multiarch (BZ 30721) 2023-08-10 10:29:29 -03:00
memmove_chk.S string: Ensure *_chk routines have their hidden builtin definition available 2023-07-05 16:59:48 +02:00
memmove.S x86_64: Fix build with --disable-multiarch (BZ 30721) 2023-08-10 10:29:29 -03:00
mempcpy_chk.S string: Ensure *_chk routines have their hidden builtin definition available 2023-07-05 16:59:48 +02:00
mempcpy.S
memrchr.S string: Add libc_hidden_proto for memrchr 2023-02-08 17:13:58 -03:00
memset_chk.S string: Ensure *_chk routines have their hidden builtin definition available 2023-07-05 16:59:48 +02:00
memset.S x86_64: Fix build with --disable-multiarch (BZ 30721) 2023-08-10 10:29:29 -03:00
mp_clz_tab.c
mul_1.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
preconfigure configure: Use autoconf 2.71 2023-07-17 10:08:10 -04:00
preconfigure.ac
rawmemchr.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
rshift.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
rtld-offsets.sym
setjmp.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
stackguard-macros.h
stackinfo.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
start.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
stpcpy.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
stpncpy.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
strcasecmp_l-nonascii.c
strcasecmp_l.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
strcasecmp.S
strcat.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
strchr-isa-default-impl.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
strchr.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
strchrnul.S string: Add libc_hidden_proto for strchrnul 2023-02-08 17:13:56 -03:00
strcmp.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
strcpy.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
strcspn-generic.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
strcspn.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
strlen.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
strncase_l-nonascii.c
strncase_l.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
strncase.S
strncat.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
strncmp.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
strncpy.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
strnlen.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
strpbrk-generic.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
strpbrk.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
strrchr.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
strspn-generic.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
strspn.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
sub_n.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
submul_1.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
sysdep.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
tls_get_addr.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
tlsdesc.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
tlsdesc.sym
tst-audit3.c
tst-audit4-aux.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
tst-audit4.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
tst-audit5.c
tst-audit6.c
tst-audit7.c
tst-audit10-aux.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
tst-audit10.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
tst-audit.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
tst-auditmod3a.c
tst-auditmod3b.c
tst-auditmod4a.c
tst-auditmod4b.c
tst-auditmod5a.c
tst-auditmod5b.c
tst-auditmod6a.c
tst-auditmod6b.c
tst-auditmod6c.c
tst-auditmod7a.c
tst-auditmod7b.c
tst-auditmod10a.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
tst-auditmod10b.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
tst-avx512-aux.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
tst-avx512.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
tst-avx512mod.c
tst-avx-aux.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
tst-avx.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
tst-avxmod.c
tst-glibc-hwcaps.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
tst-platform-1.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
tst-platformmod-1.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
tst-platformmod-2.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
tst-quad1.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
tst-quad1pie.c
tst-quad2.c
tst-quad2pie.c
tst-quadmod1.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
tst-quadmod1pie.S
tst-quadmod2.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
tst-quadmod2pie.S
tst-rsi-strlen.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
tst-rsi-wcslen.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
tst-split-dynreloc.c
tst-split-dynreloc.lds
tst-sse.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
tst-ssemod.c
varshift.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
Versions
wcpcpy-generic.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
wcpcpy.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
wcpncpy-generic.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
wcpncpy.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
wcscat-generic.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
wcscat.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
wcschr.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
wcscmp.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
wcscpy-generic.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
wcscpy.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
wcslen.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
wcsncat-generic.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
wcsncat.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
wcsncmp-generic.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
wcsncmp.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
wcsncpy-generic.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
wcsncpy.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
wcsnlen-generic.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
wcsnlen.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
wcsrchr.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
wmemchr.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
wmemcmp.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
wmemset_chk.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
wmemset.S
wordcopy.c
x86-lp_size.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00