aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/x86_64
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2023-12-29 08:43:49 -0800
committerH.J. Lu <hjl.tools@gmail.com>2024-01-01 05:22:48 -0800
commitedb5e0c8f915a798629717b5680a852c8bb3db25 (patch)
tree8b68e53c8d498b8b0ba3a37e02d8c995ec872210 /sysdeps/x86_64
parent6b32696116e0097f5dd578ec087bcbef483f2a07 (diff)
downloadglibc-edb5e0c8f915a798629717b5680a852c8bb3db25.zip
glibc-edb5e0c8f915a798629717b5680a852c8bb3db25.tar.gz
glibc-edb5e0c8f915a798629717b5680a852c8bb3db25.tar.bz2
x86/cet: Sync with Linux kernel 6.6 shadow stack interface
Sync with Linux kernel 6.6 shadow stack interface. Since only x86-64 is supported, i386 shadow stack codes are unchanged and CET shouldn't be enabled for i386. 1. When the shadow stack base in TCB is unset, the default shadow stack is in use. Use the current shadow stack pointer as the marker for the default shadow stack. It is used to identify if the current shadow stack is the same as the target shadow stack when switching ucontexts. If yes, INCSSP will be used to unwind shadow stack. Otherwise, shadow stack restore token will be used. 2. Allocate shadow stack with the map_shadow_stack syscall. Since there is no function to explicitly release ucontext, there is no place to release shadow stack allocated by map_shadow_stack in ucontext functions. Such shadow stacks will be leaked. 3. Rename arch_prctl CET commands to ARCH_SHSTK_XXX. 4. Rewrite the CET control functions with the current kernel shadow stack interface. Since CET is no longer enabled by kernel, a separate patch will enable shadow stack during startup.
Diffstat (limited to 'sysdeps/x86_64')
-rw-r--r--sysdeps/x86_64/nptl/tls.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sysdeps/x86_64/nptl/tls.h b/sysdeps/x86_64/nptl/tls.h
index 1403f93..4bcc255 100644
--- a/sysdeps/x86_64/nptl/tls.h
+++ b/sysdeps/x86_64/nptl/tls.h
@@ -60,7 +60,7 @@ typedef struct
void *__private_tm[4];
/* GCC split stack support. */
void *__private_ss;
- /* The lowest address of shadow stack, */
+ /* The marker for the current shadow stack. */
unsigned long long int ssp_base;
/* Must be kept even if it is no longer used by glibc since programs,
like AddressSanitizer, depend on the size of tcbhead_t. */