@@ -10,17 +10,8 @@
#include "bprm_opts.skel.h"
#include "network_helpers.h"
-#ifndef __NR_pidfd_open
-#define __NR_pidfd_open 434
-#endif
-
static const char * const bash_envp[] = { "TMPDIR=shouldnotbeset", NULL };
-static inline int sys_pidfd_open(pid_t pid, unsigned int flags)
-{
- return syscall(__NR_pidfd_open, pid, flags);
-}
-
static int update_storage(int map_fd, int secureexec)
{
int task_fd, ret = 0;
@@ -12,15 +12,6 @@
#include "local_storage.skel.h"
#include "network_helpers.h"
-#ifndef __NR_pidfd_open
-#define __NR_pidfd_open 434
-#endif
-
-static inline int sys_pidfd_open(pid_t pid, unsigned int flags)
-{
- return syscall(__NR_pidfd_open, pid, flags);
-}
-
static unsigned int duration;
#define TEST_STORAGE_VALUE 0xbeefdead
@@ -396,3 +396,12 @@ int trigger_module_test_write(int write_sz);
#endif
#define BPF_TESTMOD_TEST_FILE "/sys/kernel/bpf_testmod"
+
+#ifndef __NR_pidfd_open
+#define __NR_pidfd_open 434
+#endif
+
+static inline int sys_pidfd_open(pid_t pid, unsigned int flags)
+{
+ return syscall(__NR_pidfd_open, pid, flags);
+}