summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKees Cook <kees@kernel.org>2025-02-10 20:22:50 +0300
committerKees Cook <kees@kernel.org>2025-02-10 20:26:19 +0300
commit18f7686a1ce6b72e0ac61aa16f167eb931185cf1 (patch)
treeabd80207fa866524fa9e879e25e9282bd67baa22
parenta64dcfb451e254085a7daee5fe51bf22959d52d3 (diff)
downloadlinux-18f7686a1ce6b72e0ac61aa16f167eb931185cf1.tar.xz
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 <kees@kernel.org>
-rw-r--r--tools/testing/selftests/seccomp/seccomp_bpf.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/testing/selftests/seccomp/seccomp_bpf.c b/tools/testing/selftests/seccomp/seccomp_bpf.c
index 14ba51b52095..b2f76a52215a 100644
--- a/tools/testing/selftests/seccomp/seccomp_bpf.c
+++ b/tools/testing/selftests/seccomp/seccomp_bpf.c
@@ -155,6 +155,12 @@ struct seccomp_data {
# endif
#endif
+#ifndef __NR_uretprobe
+# if defined(__x86_64__)
+# define __NR_uretprobe 335
+# endif
+#endif
+
#ifndef SECCOMP_SET_MODE_STRICT
#define SECCOMP_SET_MODE_STRICT 0
#endif