Skip to content

Commit 81f3033

Browse files
rpedgecohansendc
authored andcommitted
selftests/x86: Add shadow stack test
Add a simple selftest for exercising some shadow stack behavior: - map_shadow_stack syscall and pivot - Faulting in shadow stack memory - Handling shadow stack violations - GUP of shadow stack memory - mprotect() of shadow stack memory - Userfaultfd on shadow stack memory - 32 bit segmentation - Guard gap test - Ptrace test Co-developed-by: Yu-cheng Yu <[email protected]> Signed-off-by: Yu-cheng Yu <[email protected]> Signed-off-by: Rick Edgecombe <[email protected]> Signed-off-by: Dave Hansen <[email protected]> Acked-by: Mike Rapoport (IBM) <[email protected]> Tested-by: Pengfei Xu <[email protected]> Tested-by: John Allen <[email protected]> Tested-by: Kees Cook <[email protected]> Link: https://lore.kernel.org/all/20230613001108.3040476-40-rick.p.edgecombe%40intel.com
1 parent 0dc2a76 commit 81f3033

File tree

2 files changed

+885
-1
lines changed

2 files changed

+885
-1
lines changed

tools/testing/selftests/x86/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ TARGETS_C_32BIT_ONLY := entry_from_vm86 test_syscall_vdso unwind_vdso \
1818
test_FCMOV test_FCOMI test_FISTTP \
1919
vdso_restorer
2020
TARGETS_C_64BIT_ONLY := fsgsbase sysret_rip syscall_numbering \
21-
corrupt_xstate_header amx lam
21+
corrupt_xstate_header amx lam test_shadow_stack
2222
# Some selftests require 32bit support enabled also on 64bit systems
2323
TARGETS_C_32BIT_NEEDED := ldt_gdt ptrace_syscall
2424

0 commit comments

Comments
 (0)