Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cet: update map_shadow_stack syscall number due to kernel code update #112

Merged
merged 1 commit into from
Sep 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cet/shstk_alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

#define SHADOW_STACK_SET_TOKEN 0x1
#ifndef __NR_map_shadow_stack
#define __NR_map_shadow_stack 451
#define __NR_map_shadow_stack 453
#endif

size_t shstk_size = 0x200000;
Expand Down
4 changes: 0 additions & 4 deletions cet/shstk_cp.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@
/* ARCH_SHSTK_ features bits */
#define ARCH_SHSTK_SHSTK (1ULL << 0)
#define ARCH_SHSTK_WRSS (1ULL << 1)
/* It's from arch/x86/entry/syscalls/syscall_64.tbl file. */
#ifndef __NR_map_shadow_stack
#define __NR_map_shadow_stack 451
#endif

#define rdssp() ({ \
unsigned long _ret; \
Expand Down
2 changes: 1 addition & 1 deletion cet/shstk_huge_page.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#define SHADOW_STACK_SET_TOKEN 0x1
/* It's from arch/x86/entry/syscalls/syscall_64.tbl file. */
#ifndef __NR_map_shadow_stack
#define __NR_map_shadow_stack 451
#define __NR_map_shadow_stack 453
#endif

#define PASS 0
Expand Down
5 changes: 1 addition & 4 deletions cet/shstk_unlock_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,7 @@
/* ARCH_SHSTK_ features bits */
#define ARCH_SHSTK_SHSTK (1ULL << 0)
#define ARCH_SHSTK_WRSS (1ULL << 1)
/* It's from arch/x86/entry/syscalls/syscall_64.tbl file. */
#ifndef __NR_map_shadow_stack
#define __NR_map_shadow_stack 451
#endif

/* It's from include/uapi/linux/elf.h. */
#define NT_X86_SHSTK 0x204
#define NT_X86_XSTATE 0x202
Expand Down
Loading
Loading