]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
selftests/seccomp: Add hard-coded __NR_uretprobe for x86_64
authorKees Cook <kees@kernel.org>
Mon, 10 Feb 2025 17:22:50 +0000 (09:22 -0800)
committerKees Cook <kees@kernel.org>
Mon, 10 Feb 2025 17:26:19 +0000 (09:26 -0800)
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>
tools/testing/selftests/seccomp/seccomp_bpf.c

index 14ba51b52095ac540f0acd400db41284a3a88723..b2f76a52215ad2cfa8705f79a23ed0c8bdf8f8cb 100644 (file)
@@ -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