Skip to content

Commit 18f7686

Browse files
committed
selftests/seccomp: Add hard-coded __NR_uretprobe for x86_64
Since headers don't always follow the selftests around correct, explicitly include the __NR_uretprobe syscall for better test coverage. Signed-off-by: Kees Cook <[email protected]>
1 parent a64dcfb commit 18f7686

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tools/testing/selftests/seccomp/seccomp_bpf.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,12 @@ struct seccomp_data {
155155
# endif
156156
#endif
157157

158+
#ifndef __NR_uretprobe
159+
# if defined(__x86_64__)
160+
# define __NR_uretprobe 335
161+
# endif
162+
#endif
163+
158164
#ifndef SECCOMP_SET_MODE_STRICT
159165
#define SECCOMP_SET_MODE_STRICT 0
160166
#endif

0 commit comments

Comments
 (0)