glibc/sysdeps/x86
H.J. Lu edb5e0c8f9 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.
2024-01-01 05:22:48 -08:00
..
bits x86: Add support for AVX10 preset and vec size in cpu-features 2023-09-29 14:18:42 -05:00
fpu i686: Do not raise exception traps on fesetexcept (BZ 30989) 2023-12-19 15:12:38 -03:00
htl Fix a few more typos I missed in previous round -- BZ 25337 2023-06-02 23:46:32 +00:00
include x86: Add support for AVX10 preset and vec size in cpu-features 2023-09-29 14:18:42 -05:00
nptl Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
sys/platform Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
__longjmp_cancel.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
abi-note.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
atomic-machine.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
cacheinfo.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
cacheinfo.h Remove --enable-tunables configure option 2023-03-29 14:33:06 -03:00
cet-control.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
check-cet.awk 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 x86_64: State assembler is being tested on sysdeps/x86/configure 2022-12-06 13:47:47 -03:00
cpu-features-offsets.sym x86: Cleanup cpu-features-offsets.sym 2018-08-03 06:42:09 -07:00
cpu-features.c x86/cet: Sync with Linux kernel 6.6 shadow stack interface 2024-01-01 05:22:48 -08:00
cpu-tunables.c Fix elf: Do not duplicate the GLIBC_TUNABLES string 2023-12-19 16:01:33 -08:00
dl-cacheinfo.h x86: Check the lower byte of EAX of CPUID leaf 2 [BZ #30643] 2023-08-29 12:57:41 -07:00
dl-cet.c x86/cet: Sync with Linux kernel 6.6 shadow stack interface 2024-01-01 05:22:48 -08:00
dl-diagnostics-cpu.c x86: Make the divisor in setting non_temporal_threshold cpu specific 2023-06-12 11:33:39 -05:00
dl-get-cpu-features.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
dl-hwcap2.h x86: Set FSGSBASE to active if enabled by kernel 2023-04-03 11:36:48 -07:00
dl-hwcap.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
dl-isa-level.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
dl-lookupcfg.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
dl-minsigstacksize.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
dl-new-hash.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
dl-procinfo.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
dl-procinfo.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
dl-procruntime.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
dl-prop.h x86: Check PT_GNU_PROPERTY early 2023-12-11 11:05:46 -08:00
dl-tunables.list Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
elf-initfini.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
elide.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
float128-abi.h Move __isnanf128 to libc.so 2021-03-30 14:58:19 +05:30
fpu_control.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
get-cpuid-feature-leaf.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
get-isa-level.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
hp-timing.h Fix misspellings in sysdeps/ -- BZ 25337 2023-05-30 23:02:29 +00:00
init-arch.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
isa-ifunc-macros.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
isa-level.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
isa-level.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
jmp_buf-ssp.sym x86: Support shadow stack pointer in setjmp/longjmp 2018-07-14 05:59:53 -07:00
ldbl2mpn.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
ldsodefs.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
libc-start.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
libc-start.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
link_map.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
linkmap.h Rename bits/linkmap.h to linkmap.h (bug 14912). 2015-09-04 19:44:27 +00:00
longjmp.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
Makeconfig Add _Float64x function aliases. 2017-11-27 14:16:47 +00:00
Makefile elf: Do not duplicate the GLIBC_TUNABLES string 2023-12-19 13:25:45 -03:00
readelflib.c x86: Make dl-cache.h and readelflib.c not Linux-specific 2023-06-26 10:04:31 -03:00
sysdep.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
tininess.h Use sysdeps/x86/tininess.h for i386 and x86_64 2012-10-30 20:38:31 -07:00
tst-cet-legacy-1.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
tst-cet-legacy-1a.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
tst-cet-legacy-2.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
tst-cet-legacy-2a.c x86/CET: Add tests with legacy non-CET shared objects 2018-07-25 04:47:05 -07:00
tst-cet-legacy-3.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
tst-cet-legacy-4.c x86/cet: Check CPU_FEATURE_ACTIVE in permissive mode 2023-12-19 06:58:05 -08:00
tst-cet-legacy-4a.c x86/CET: Add tests with legacy non-CET shared objects 2018-07-25 04:47:05 -07:00
tst-cet-legacy-4b.c x86/CET: Add tests with legacy non-CET shared objects 2018-07-25 04:47:05 -07:00
tst-cet-legacy-4c.c x86/CET: Add tests with legacy non-CET shared objects 2018-07-25 04:47:05 -07:00
tst-cet-legacy-5.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
tst-cet-legacy-5a.c Call _dl_open_check after relocation [BZ #24259] 2019-07-01 12:23:22 -07:00
tst-cet-legacy-5b.c Call _dl_open_check after relocation [BZ #24259] 2019-07-01 12:23:22 -07:00
tst-cet-legacy-6.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
tst-cet-legacy-6a.c Call _dl_open_check after relocation [BZ #24259] 2019-07-01 12:23:22 -07:00
tst-cet-legacy-6b.c Call _dl_open_check after relocation [BZ #24259] 2019-07-01 12:23:22 -07:00
tst-cet-legacy-7.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
tst-cet-legacy-8.c x86/cet: Don't assume that SHSTK implies IBT 2023-12-18 07:04:18 -08:00
tst-cet-legacy-9-static.c x86: Properly set usable CET feature bits [BZ #26625] 2021-01-29 03:58:11 -08:00
tst-cet-legacy-9.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
tst-cet-legacy-10-static.c x86: Properly set usable CET feature bits [BZ #26625] 2021-01-29 03:58:11 -08:00
tst-cet-legacy-10.c x86/cet: Don't assume that SHSTK implies IBT 2023-12-18 07:04:18 -08:00
tst-cet-legacy-10a-static.c x86/cet: Check CPU_FEATURE_ACTIVE when CET is disabled 2023-12-19 06:57:32 -08:00
tst-cet-legacy-10a.c x86/cet: Check CPU_FEATURE_ACTIVE when CET is disabled 2023-12-19 06:57:32 -08:00
tst-cet-legacy-mod-1.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
tst-cet-legacy-mod-2.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
tst-cet-legacy-mod-4.c x86/CET: Add tests with legacy non-CET shared objects 2018-07-25 04:47:05 -07:00
tst-cet-legacy-mod-5.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
tst-cet-legacy-mod-5a.c Call _dl_open_check after relocation [BZ #24259] 2019-07-01 12:23:22 -07:00
tst-cet-legacy-mod-5b.c Call _dl_open_check after relocation [BZ #24259] 2019-07-01 12:23:22 -07:00
tst-cet-legacy-mod-5c.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
tst-cet-legacy-mod-6.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
tst-cet-legacy-mod-6a.c Call _dl_open_check after relocation [BZ #24259] 2019-07-01 12:23:22 -07:00
tst-cet-legacy-mod-6b.c Call _dl_open_check after relocation [BZ #24259] 2019-07-01 12:23:22 -07:00
tst-cet-legacy-mod-6c.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
tst-cet-legacy-mod-6d.c Call _dl_open_check after relocation [BZ #24259] 2019-07-01 12:23:22 -07:00
tst-cpu-features-cpuinfo-static.c x86: Add PTWRITE feature detection [BZ #27346] 2021-02-07 08:01:14 -08:00
tst-cpu-features-cpuinfo.c x86/cet: Check user_shstk in /proc/cpuinfo 2023-12-17 10:42:06 -08:00
tst-cpu-features-supports-static.c x86: Add PTWRITE feature detection [BZ #27346] 2021-02-07 08:01:14 -08:00
tst-cpu-features-supports.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
tst-get-cpu-features-static.c Add _dl_x86_cpu_features to rtld_global 2015-08-13 03:41:22 -07:00
tst-get-cpu-features.c x86: Add support for AVX10 preset and vec size in cpu-features 2023-09-29 14:18:42 -05:00
tst-hwcap-tunables.c Fix elf: Do not duplicate the GLIBC_TUNABLES string 2023-12-19 13:34:14 -08:00
tst-ifunc-isa-1-static.c x86: Check ifunc resolver with CPU_FEATURE_USABLE [BZ #27072] 2021-01-21 10:22:26 -08:00
tst-ifunc-isa-1.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
tst-ifunc-isa-2-static.c x86: Check ifunc resolver with CPU_FEATURE_USABLE [BZ #27072] 2021-01-21 10:22:26 -08:00
tst-ifunc-isa-2.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
tst-ifunc-isa.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
tst-isa-level-1.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
tst-isa-level-mod-1-baseline.c x86: Support GNU_PROPERTY_X86_ISA_1_V[234] marker [BZ #26717] 2021-01-07 13:10:13 -08:00
tst-isa-level-mod-1-v2.c x86: Support GNU_PROPERTY_X86_ISA_1_V[234] marker [BZ #26717] 2021-01-07 13:10:13 -08:00
tst-isa-level-mod-1-v3.c x86: Support GNU_PROPERTY_X86_ISA_1_V[234] marker [BZ #26717] 2021-01-07 13:10:13 -08:00
tst-isa-level-mod-1-v4.c x86: Support GNU_PROPERTY_X86_ISA_1_V[234] marker [BZ #26717] 2021-01-07 13:10:13 -08:00
tst-isa-level-mod-1.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
tst-ldbl-nonnormal-printf.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
tst-memchr-rtm.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
tst-memcmp-rtm.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
tst-memmove-rtm.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
tst-memrchr-rtm.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
tst-memset-rtm.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
tst-setjmp-cet.c x86: Set header.feature_1 in TCB for always-on CET [BZ #27177] 2021-01-13 05:03:34 -08:00
tst-shstk-legacy-1-extra.S x86/cet: Check legacy shadow stack applications 2023-12-19 06:57:27 -08:00
tst-shstk-legacy-1a-static.c x86/cet: Check legacy shadow stack applications 2023-12-19 06:57:27 -08:00
tst-shstk-legacy-1a.c x86/cet: Check legacy shadow stack applications 2023-12-19 06:57:27 -08:00
tst-shstk-legacy-1b-static.c x86/cet: Check legacy shadow stack applications 2023-12-19 06:57:27 -08:00
tst-shstk-legacy-1b.c x86/cet: Check legacy shadow stack applications 2023-12-19 06:57:27 -08:00
tst-shstk-legacy-1c-static.c x86/cet: Add tests for GLIBC_TUNABLES=glibc.cpu.hwcaps=-SHSTK 2023-12-19 06:57:39 -08:00
tst-shstk-legacy-1c.c x86/cet: Add tests for GLIBC_TUNABLES=glibc.cpu.hwcaps=-SHSTK 2023-12-19 06:57:39 -08:00
tst-shstk-legacy-1d-static.c x86/cet: Check legacy shadow stack code in .init_array section 2023-12-19 06:57:47 -08:00
tst-shstk-legacy-1d.c x86/cet: Check legacy shadow stack code in .init_array section 2023-12-19 06:57:47 -08:00
tst-shstk-legacy-1e-static.c x86/cet: Check legacy shadow stack code in .init_array section 2023-12-19 06:57:47 -08:00
tst-shstk-legacy-1e-static.sh x86/cet: Check legacy shadow stack code in .init_array section 2023-12-19 06:57:47 -08:00
tst-shstk-legacy-1e.c x86/cet: Check legacy shadow stack code in .init_array section 2023-12-19 06:57:47 -08:00
tst-shstk-legacy-1e.sh x86/cet: Check legacy shadow stack code in .init_array section 2023-12-19 06:57:47 -08:00
tst-shstk-legacy-1f.c x86/cet: Check legacy shadow stack code in .init_array section 2023-12-19 06:57:47 -08:00
tst-shstk-legacy-1g.c x86/cet: Check legacy shadow stack code in .init_array section 2023-12-19 06:57:47 -08:00
tst-shstk-legacy-1g.sh x86/cet: Check legacy shadow stack code in .init_array section 2023-12-19 06:57:47 -08:00
tst-shstk-legacy-mod-1.c x86/cet: Check legacy shadow stack code in .init_array section 2023-12-19 06:57:47 -08:00
tst-stack-align.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
tst-strcasecmp-rtm.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
tst-strchr-rtm.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
tst-strcmp-rtm.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
tst-strcpy-rtm.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
tst-string-rtm.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
tst-strlen-rtm.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
tst-strncasecmp-rtm.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
tst-strncmp-rtm.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
tst-strrchr-rtm.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
tst-sysconf-cache-linesize-static.c x86: Handle _SC_LEVEL1_ICACHE_LINESIZE [BZ #27444] 2021-03-15 05:43:26 -07:00
tst-sysconf-cache-linesize.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
tst-wcscmp-rtm.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
tst-wcsncmp-rtm.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
Versions <sys/platform/x86.h>: Remove the C preprocessor magic 2021-01-21 05:58:17 -08:00