Lines Matching refs:tracee

1494 			   pid_t tracee, int status, void *args);
1496 void start_tracer(struct __test_metadata *_metadata, int fd, pid_t tracee, in start_tracer() argument
1510 ret = ptrace(PTRACE_ATTACH, tracee, NULL, 0); in start_tracer()
1512 kill(tracee, SIGKILL); in start_tracer()
1517 ret = ptrace(PTRACE_SETOPTIONS, tracee, NULL, ptrace_syscall ? in start_tracer()
1522 kill(tracee, SIGKILL); in start_tracer()
1525 tracee, NULL, 0); in start_tracer()
1536 if (wait(&status) != tracee) in start_tracer()
1545 tracer_func(_metadata, tracee, status, args); in start_tracer()
1548 tracee, NULL, 0); in start_tracer()
1564 pid_t tracee = getpid(); in setup_trace_fixture() local
1575 start_tracer(_metadata, pipefd[1], tracee, func, args, in setup_trace_fixture()
1608 void tracer_poke(struct __test_metadata *_metadata, pid_t tracee, int status, in tracer_poke() argument
1615 ret = ptrace(PTRACE_GETEVENTMSG, tracee, NULL, &msg); in tracer_poke()
1619 kill(tracee, SIGKILL); in tracer_poke()
1626 ret = ptrace(PTRACE_POKEDATA, tracee, info->poke_addr, 0x1001); in tracer_poke()
1715 EXPECT_EQ(0, ptrace(PTRACE_SET_SYSCALL, tracee, NULL, _nr))
1729 EXPECT_EQ(0, ptrace(PTRACE_SETREGSET, tracee, \
1874 # define ARCH_GETREGS(_regs) ptrace(PTRACE_GETREGS, tracee, 0, &(_regs))
1875 # define ARCH_SETREGS(_regs) ptrace(PTRACE_SETREGS, tracee, 0, &(_regs))
1881 ptrace(PTRACE_GETREGSET, tracee, NT_PRSTATUS, &__v); \
1887 ptrace(PTRACE_SETREGSET, tracee, NT_PRSTATUS, &__v); \
1892 int get_syscall(struct __test_metadata *_metadata, pid_t tracee) in get_syscall() argument
1905 pid_t tracee, long *syscall, long *ret) in __change_syscall() argument
1931 pid_t tracee, long syscall) in change_syscall_nr() argument
1933 __change_syscall(_metadata, tracee, &syscall, NULL); in change_syscall_nr()
1938 pid_t tracee, long ret) in change_syscall_ret() argument
1942 __change_syscall(_metadata, tracee, &syscall, &ret); in change_syscall_ret()
1945 void tracer_seccomp(struct __test_metadata *_metadata, pid_t tracee, in tracer_seccomp() argument
1952 ret = ptrace(PTRACE_GETEVENTMSG, tracee, NULL, &msg); in tracer_seccomp()
1959 EXPECT_EQ(__NR_getpid, get_syscall(_metadata, tracee)); in tracer_seccomp()
1960 change_syscall_nr(_metadata, tracee, __NR_getppid); in tracer_seccomp()
1964 EXPECT_EQ(__NR_gettid, get_syscall(_metadata, tracee)); in tracer_seccomp()
1965 change_syscall_ret(_metadata, tracee, 45000); in tracer_seccomp()
1969 EXPECT_EQ(__NR_openat, get_syscall(_metadata, tracee)); in tracer_seccomp()
1970 change_syscall_ret(_metadata, tracee, -ESRCH); in tracer_seccomp()
1974 EXPECT_EQ(__NR_getppid, get_syscall(_metadata, tracee)); in tracer_seccomp()
1979 kill(tracee, SIGKILL); in tracer_seccomp()
1991 void tracer_ptrace(struct __test_metadata *_metadata, pid_t tracee, in tracer_ptrace() argument
2008 ret = ptrace(PTRACE_GETEVENTMSG, tracee, NULL, &msg); in tracer_ptrace()
2021 self->syscall_nr = get_syscall(_metadata, tracee); in tracer_ptrace()
2052 __change_syscall(_metadata, tracee, syscall_nr, syscall_ret); in tracer_ptrace()