Lines Matching refs:pid

29 int is_skas_winch(int pid, int fd, void *data)  in is_skas_winch()  argument
31 return pid == getpgrp(); in is_skas_winch()
82 static int ptrace_dump_regs(int pid) in ptrace_dump_regs() argument
87 if (ptrace(PTRACE_GETREGS, pid, 0, regs) < 0) in ptrace_dump_regs()
109 void wait_stub_done(int pid) in wait_stub_done() argument
114 CATCH_EINTR(n = waitpid(pid, &status, WUNTRACED | __WALL)); in wait_stub_done()
121 err = ptrace(PTRACE_CONT, pid, 0, 0); in wait_stub_done()
133 err = ptrace_dump_regs(pid); in wait_stub_done()
138 __func__, pid, n, errno, status); in wait_stub_done()
144 static void get_skas_faultinfo(int pid, struct faultinfo *fi, unsigned long *aux_fp_regs) in get_skas_faultinfo() argument
148 err = get_fp_registers(pid, aux_fp_regs); in get_skas_faultinfo()
154 err = ptrace(PTRACE_CONT, pid, 0, SIGSEGV); in get_skas_faultinfo()
157 "errno = %d\n", pid, errno); in get_skas_faultinfo()
160 wait_stub_done(pid); in get_skas_faultinfo()
168 err = put_fp_registers(pid, aux_fp_regs); in get_skas_faultinfo()
176 static void handle_segv(int pid, struct uml_pt_regs *regs, unsigned long *aux_fp_regs) in handle_segv() argument
178 get_skas_faultinfo(pid, &regs->faultinfo, aux_fp_regs); in handle_segv()
182 static void handle_trap(int pid, struct uml_pt_regs *regs) in handle_trap() argument
273 int pid, status, n, flags, err; in start_userspace() local
292 pid = clone(userspace_tramp, (void *) sp, flags, (void *) stub_stack); in start_userspace()
293 if (pid < 0) { in start_userspace()
301 CATCH_EINTR(n = waitpid(pid, &status, WUNTRACED | __WALL)); in start_userspace()
317 if (ptrace(PTRACE_SETOPTIONS, pid, NULL, in start_userspace()
332 return pid; in start_userspace()
335 os_kill_ptraced_process(pid, 1); in start_userspace()
341 int err, status, op, pid = userspace_pid[0]; in userspace() local
371 if (ptrace(PTRACE_SETREGS, pid, 0, regs->gp)) { in userspace()
377 if (put_fp_registers(pid, regs->fp)) { in userspace()
388 if (ptrace(op, pid, 0, 0)) { in userspace()
394 CATCH_EINTR(err = waitpid(pid, &status, WUNTRACED | __WALL)); in userspace()
402 if (ptrace(PTRACE_GETREGS, pid, 0, regs->gp)) { in userspace()
408 if (get_fp_registers(pid, regs->fp)) { in userspace()
430 ptrace(PTRACE_GETSIGINFO, pid, 0, (struct siginfo *)&si); in userspace()
437 get_skas_faultinfo(pid, in userspace()
442 else handle_segv(pid, regs, aux_fp_regs); in userspace()
445 handle_trap(pid, regs); in userspace()
466 pid = userspace_pid[0]; in userspace()
591 userspace_pid[0] = mm_idp->pid; in __switch_mm()