aboutsummaryrefslogtreecommitdiffstats
path: root/pkg
diff options
context:
space:
mode:
Diffstat (limited to 'pkg')
-rw-r--r--pkg/csource/generated.go12
-rw-r--r--pkg/host/syscalls_linux.go1
2 files changed, 13 insertions, 0 deletions
diff --git a/pkg/csource/generated.go b/pkg/csource/generated.go
index 4c3fae47c..e65b95095 100644
--- a/pkg/csource/generated.go
+++ b/pkg/csource/generated.go
@@ -11823,6 +11823,18 @@ static void setup_swap()
#endif
+#if SYZ_EXECUTOR || __NR_syz_pidfd_open
+#include <sys/syscall.h>
+static long syz_pidfd_open(volatile long pid, volatile long flags)
+{
+ if (pid == 1) {
+ pid = 0;
+ }
+ return syscall(__NR_pidfd_open, pid, flags);
+}
+
+#endif
+
#elif GOOS_test
#include <stdlib.h>
diff --git a/pkg/host/syscalls_linux.go b/pkg/host/syscalls_linux.go
index b1bcbfb8b..d59fe491b 100644
--- a/pkg/host/syscalls_linux.go
+++ b/pkg/host/syscalls_linux.go
@@ -327,6 +327,7 @@ var syzkallSupport = map[string]func(*prog.Syscall, *prog.Target, string) (bool,
"syz_clone3": alwaysSupported,
"syz_pkey_set": isSyzPkeySetSupported,
"syz_socket_connect_nvme_tcp": isSyzSocketConnectNvmeTCPSupported,
+ "syz_pidfd_open": alwaysSupported,
}
func isSupportedSyzkall(c *prog.Syscall, target *prog.Target, sandbox string) (bool, string) {