Lines Matching defs:tracee
1539 pid_t tracee, int status, void *args);
1541 void start_tracer(struct __test_metadata *_metadata, int fd, pid_t tracee,
1555 ret = ptrace(PTRACE_ATTACH, tracee, NULL, 0);
1557 kill(tracee, SIGKILL);
1562 ret = ptrace(PTRACE_SETOPTIONS, tracee, NULL, ptrace_syscall ?
1567 kill(tracee, SIGKILL);
1570 tracee, NULL, 0);
1573 /* Unblock the tracee */
1581 if (wait(&status) != tracee)
1600 tracer_func(_metadata, tracee, status, args);
1603 tracee, NULL, 0);
1619 pid_t tracee = getpid();
1630 start_tracer(_metadata, pipefd[1], tracee, func, args,
1657 void tracer_poke(struct __test_metadata *_metadata, pid_t tracee, int status,
1664 ret = ptrace(PTRACE_GETEVENTMSG, tracee, NULL, &msg);
1668 kill(tracee, SIGKILL);
1675 ret = ptrace(PTRACE_POKEDATA, tracee, info->poke_addr, 0x1001);
1764 EXPECT_EQ(0, ptrace(PTRACE_SET_SYSCALL, tracee, NULL, _nr))
1778 EXPECT_EQ(0, ptrace(PTRACE_SETREGSET, tracee, \
1940 # define ARCH_GETREGS(_regs) ptrace(PTRACE_GETREGS, tracee, 0, &(_regs))
1941 # define ARCH_SETREGS(_regs) ptrace(PTRACE_SETREGS, tracee, 0, &(_regs))
1947 ptrace(PTRACE_GETREGSET, tracee, NT_PRSTATUS, &__v); \
1953 ptrace(PTRACE_SETREGSET, tracee, NT_PRSTATUS, &__v); \
1958 int get_syscall(struct __test_metadata *_metadata, pid_t tracee)
1971 pid_t tracee, long *syscall, long *ret)
1997 pid_t tracee, long syscall)
1999 __change_syscall(_metadata, tracee, &syscall, NULL);
2004 pid_t tracee, long ret)
2008 __change_syscall(_metadata, tracee, &syscall, &ret);
2011 void tracer_seccomp(struct __test_metadata *_metadata, pid_t tracee,
2023 ret = ptrace(PTRACE_GETEVENTMSG, tracee, NULL, &msg);
2030 EXPECT_EQ(__NR_getpid, get_syscall(_metadata, tracee));
2031 change_syscall_nr(_metadata, tracee, __NR_getppid);
2035 EXPECT_EQ(__NR_gettid, get_syscall(_metadata, tracee));
2036 change_syscall_ret(_metadata, tracee, 45000);
2040 EXPECT_EQ(__NR_openat, get_syscall(_metadata, tracee));
2041 change_syscall_ret(_metadata, tracee, -ESRCH);
2045 EXPECT_EQ(__NR_getppid, get_syscall(_metadata, tracee));
2050 kill(tracee, SIGKILL);
2062 void tracer_ptrace(struct __test_metadata *_metadata, pid_t tracee,
2084 ret = ptrace(PTRACE_GETEVENTMSG, tracee, NULL, &msg);
2097 self->syscall_nr = get_syscall(_metadata, tracee);
2128 __change_syscall(_metadata, tracee, syscall_nr, syscall_ret);