diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2023-12-29 08:43:49 -0800 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2024-01-01 05:22:48 -0800 |
commit | edb5e0c8f915a798629717b5680a852c8bb3db25 (patch) | |
tree | 8b68e53c8d498b8b0ba3a37e02d8c995ec872210 /sysdeps/generic | |
parent | 6b32696116e0097f5dd578ec087bcbef483f2a07 (diff) | |
download | glibc-edb5e0c8f915a798629717b5680a852c8bb3db25.tar.gz glibc-edb5e0c8f915a798629717b5680a852c8bb3db25.tar.xz glibc-edb5e0c8f915a798629717b5680a852c8bb3db25.zip |
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/generic')
0 files changed, 0 insertions, 0 deletions