Lines Matching refs:tracee
1022 pid_t tracee, int status, void *args);
1024 void tracer(struct __test_metadata *_metadata, int fd, pid_t tracee, in tracer() argument
1038 ret = ptrace(PTRACE_ATTACH, tracee, NULL, 0); in tracer()
1040 kill(tracee, SIGKILL); in tracer()
1045 ret = ptrace(PTRACE_SETOPTIONS, tracee, NULL, PTRACE_O_TRACESECCOMP); in tracer()
1048 kill(tracee, SIGKILL); in tracer()
1050 ptrace(PTRACE_CONT, tracee, NULL, 0); in tracer()
1060 if (wait(&status) != tracee) in tracer()
1069 tracer_func(_metadata, tracee, status, args); in tracer()
1071 ret = ptrace(PTRACE_CONT, tracee, NULL, NULL); in tracer()
1087 pid_t tracee = getpid(); in setup_trace_fixture() local
1098 tracer(_metadata, pipefd[1], tracee, func, args); in setup_trace_fixture()
1129 void tracer_poke(struct __test_metadata *_metadata, pid_t tracee, int status, in tracer_poke() argument
1136 ret = ptrace(PTRACE_GETEVENTMSG, tracee, NULL, &msg); in tracer_poke()
1140 kill(tracee, SIGKILL); in tracer_poke()
1147 ret = ptrace(PTRACE_POKEDATA, tracee, info->poke_addr, 0x1001); in tracer_poke()
1250 int get_syscall(struct __test_metadata *_metadata, pid_t tracee) in get_syscall() argument
1257 EXPECT_EQ(0, ptrace(PTRACE_GETREGSET, tracee, NT_PRSTATUS, &iov)) { in get_syscall()
1267 pid_t tracee, int syscall) in change_syscall() argument
1275 ret = ptrace(PTRACE_GETREGSET, tracee, NT_PRSTATUS, &iov); in change_syscall()
1289 ret = ptrace(PTRACE_SET_SYSCALL, tracee, NULL, syscall); in change_syscall()
1300 ret = ptrace(PTRACE_SETREGSET, tracee, NT_ARM_SYSTEM_CALL, in change_syscall()
1317 ret = ptrace(PTRACE_SETREGSET, tracee, NT_PRSTATUS, &iov); in change_syscall()
1321 void tracer_syscall(struct __test_metadata *_metadata, pid_t tracee, in tracer_syscall() argument
1328 ret = ptrace(PTRACE_GETEVENTMSG, tracee, NULL, &msg); in tracer_syscall()
1335 EXPECT_EQ(__NR_getpid, get_syscall(_metadata, tracee)); in tracer_syscall()
1336 change_syscall(_metadata, tracee, __NR_getppid); in tracer_syscall()
1340 EXPECT_EQ(__NR_gettid, get_syscall(_metadata, tracee)); in tracer_syscall()
1341 change_syscall(_metadata, tracee, -1); in tracer_syscall()
1345 EXPECT_EQ(__NR_getppid, get_syscall(_metadata, tracee)); in tracer_syscall()
1350 kill(tracee, SIGKILL); in tracer_syscall()