/arch/x86/um/os-Linux/ |
D | registers.c | 20 int save_i387_registers(int pid, unsigned long *fp_regs) in save_i387_registers() argument 22 if (ptrace(PTRACE_GETFPREGS, pid, 0, fp_regs) < 0) in save_i387_registers() 27 int save_fp_registers(int pid, unsigned long *fp_regs) in save_fp_registers() argument 34 if (ptrace(PTRACE_GETREGSET, pid, NT_X86_XSTATE, &iov) < 0) in save_fp_registers() 38 return save_i387_registers(pid, fp_regs); in save_fp_registers() 42 int restore_i387_registers(int pid, unsigned long *fp_regs) in restore_i387_registers() argument 44 if (ptrace(PTRACE_SETFPREGS, pid, 0, fp_regs) < 0) in restore_i387_registers() 49 int restore_fp_registers(int pid, unsigned long *fp_regs) in restore_fp_registers() argument 56 if (ptrace(PTRACE_SETREGSET, pid, NT_X86_XSTATE, &iov) < 0) in restore_fp_registers() 60 return restore_i387_registers(pid, fp_regs); in restore_fp_registers() [all …]
|
D | tls.c | 47 int os_set_thread_area(user_desc_t *info, int pid) in os_set_thread_area() argument 51 ret = ptrace(PTRACE_SET_THREAD_AREA, pid, info->entry_number, in os_set_thread_area() 58 int os_get_thread_area(user_desc_t *info, int pid) in os_get_thread_area() argument 62 ret = ptrace(PTRACE_GET_THREAD_AREA, pid, info->entry_number, in os_get_thread_area()
|
/arch/um/os-Linux/ |
D | start_up.c | 32 int pid = os_getpid(), ppid = getppid(); in ptrace_child() local 38 kill(pid, SIGKILL); in ptrace_child() 40 kill(pid, SIGSTOP); in ptrace_child() 48 if (sc_result == pid) in ptrace_child() 95 int pid, n, status; in start_ptraced_child() local 99 pid = fork(); in start_ptraced_child() 100 if (pid == 0) in start_ptraced_child() 102 else if (pid < 0) in start_ptraced_child() 105 CATCH_EINTR(n = waitpid(pid, &status, WUNTRACED)); in start_ptraced_child() 112 return pid; in start_ptraced_child() [all …]
|
D | helper.c | 46 int pid, fds[2], ret, n; in run_helper() local 74 pid = clone(helper_child, (void *) sp, CLONE_VM, &data); in run_helper() 75 if (pid < 0) { in run_helper() 91 ret = pid; in run_helper() 99 CATCH_EINTR(waitpid(pid, NULL, __WALL)); in run_helper() 117 int pid, status, err; in run_helper_thread() local 124 pid = clone(proc, (void *) sp, flags, arg); in run_helper_thread() 125 if (pid < 0) { in run_helper_thread() 132 CATCH_EINTR(pid = waitpid(pid, &status, __WALL)); in run_helper_thread() 133 if (pid < 0) { in run_helper_thread() [all …]
|
D | registers.c | 14 int save_registers(int pid, struct uml_pt_regs *regs) in save_registers() argument 18 err = ptrace(PTRACE_GETREGS, pid, 0, regs->gp); in save_registers() 24 int restore_registers(int pid, struct uml_pt_regs *regs) in restore_registers() argument 28 err = ptrace(PTRACE_SETREGS, pid, 0, regs->gp); in restore_registers() 39 int init_registers(int pid) in init_registers() argument 43 err = ptrace(PTRACE_GETREGS, pid, 0, exec_regs); in init_registers() 47 arch_init_registers(pid); in init_registers() 48 get_fp_registers(pid, exec_fp_regs); in init_registers()
|
D | process.c | 27 unsigned long os_process_pc(int pid) in os_process_pc() argument 33 sprintf(proc_stat, "/proc/%d/stat", pid); in os_process_pc() 59 int os_process_parent(int pid) in os_process_parent() argument 65 if (pid == -1) in os_process_parent() 68 snprintf(stat, sizeof(stat), "/proc/%d/stat", pid); in os_process_parent() 93 void os_alarm_process(int pid) in os_alarm_process() argument 95 kill(pid, SIGALRM); in os_alarm_process() 98 void os_stop_process(int pid) in os_stop_process() argument 100 kill(pid, SIGSTOP); in os_stop_process() 103 void os_kill_process(int pid, int reap_child) in os_kill_process() argument [all …]
|
D | umid.c | 136 char pid[sizeof("nnnnn\0")], *end; in is_umdir_used() local 158 n = read(fd, pid, sizeof(pid)); in is_umdir_used() 169 p = strtoul(pid, &end, 0); in is_umdir_used() 170 if (end == pid) { in is_umdir_used() 211 char pid[sizeof("nnnnn\0")]; in create_pid_file() local 224 snprintf(pid, sizeof(pid), "%d\n", getpid()); in create_pid_file() 225 n = write(fd, pid, strlen(pid)); in create_pid_file() 226 if (n != strlen(pid)) in create_pid_file()
|
/arch/um/include/shared/ |
D | registers.h | 12 extern int save_i387_registers(int pid, unsigned long *fp_regs); 13 extern int restore_i387_registers(int pid, unsigned long *fp_regs); 14 extern int save_fp_registers(int pid, unsigned long *fp_regs); 15 extern int restore_fp_registers(int pid, unsigned long *fp_regs); 16 extern int save_fpx_registers(int pid, unsigned long *fp_regs); 17 extern int restore_fpx_registers(int pid, unsigned long *fp_regs); 18 extern int save_registers(int pid, struct uml_pt_regs *regs); 19 extern int restore_registers(int pid, struct uml_pt_regs *regs); 20 extern int init_registers(int pid); 23 extern int get_fp_registers(int pid, unsigned long *regs); [all …]
|
/arch/um/os-Linux/skas/ |
D | process.c | 25 int is_skas_winch(int pid, int fd, void *data) in is_skas_winch() argument 27 return pid == getpgrp(); in is_skas_winch() 30 static int ptrace_dump_regs(int pid) in ptrace_dump_regs() argument 35 if (ptrace(PTRACE_GETREGS, pid, 0, regs) < 0) in ptrace_dump_regs() 54 void wait_stub_done(int pid) in wait_stub_done() argument 59 CATCH_EINTR(n = waitpid(pid, &status, WUNTRACED | __WALL)); in wait_stub_done() 66 err = ptrace(PTRACE_CONT, pid, 0, 0); in wait_stub_done() 78 err = ptrace_dump_regs(pid); in wait_stub_done() 83 "pid = %d, n = %d, errno = %d, status = 0x%x\n", pid, n, errno, in wait_stub_done() 90 static void get_skas_faultinfo(int pid, struct faultinfo *fi) in get_skas_faultinfo() argument [all …]
|
/arch/powerpc/mm/ |
D | tlb-radix.c | 26 static inline void __tlbiel_pid(unsigned long pid, int set, in __tlbiel_pid() argument 33 rs = ((unsigned long)pid) << PPC_BITLSHIFT(31); in __tlbiel_pid() 46 static inline void _tlbiel_pid(unsigned long pid, unsigned long ric) in _tlbiel_pid() argument 51 __tlbiel_pid(pid, set, ric); in _tlbiel_pid() 56 static inline void _tlbie_pid(unsigned long pid, unsigned long ric) in _tlbie_pid() argument 61 rs = pid << PPC_BITLSHIFT(31); in _tlbie_pid() 71 static inline void _tlbiel_va(unsigned long va, unsigned long pid, in _tlbiel_va() argument 78 rs = pid << PPC_BITLSHIFT(31); in _tlbiel_va() 88 static inline void _tlbie_va(unsigned long va, unsigned long pid, in _tlbie_va() argument 95 rs = pid << PPC_BITLSHIFT(31); in _tlbie_va() [all …]
|
D | mmu_decl.h | 35 static inline void _tlbil_pid(unsigned int pid) in _tlbil_pid() argument 39 #define _tlbil_pid_noind(pid) _tlbil_pid(pid) argument 43 extern void _tlbil_pid(unsigned int pid); 45 extern void _tlbil_pid_noind(unsigned int pid); 47 #define _tlbil_pid_noind(pid) _tlbil_pid(pid) argument 55 static inline void _tlbil_va(unsigned long address, unsigned int pid, in _tlbil_va() argument 61 extern void _tlbil_va(unsigned long address, unsigned int pid, 64 extern void __tlbil_va(unsigned long address, unsigned int pid); 65 static inline void _tlbil_va(unsigned long address, unsigned int pid, in _tlbil_va() argument 68 __tlbil_va(address, pid); in _tlbil_va() [all …]
|
D | tlb_nohash.c | 182 unsigned int pid; in local_flush_tlb_mm() local 185 pid = mm->context.id; in local_flush_tlb_mm() 186 if (pid != MMU_NO_CONTEXT) in local_flush_tlb_mm() 187 _tlbil_pid(pid); in local_flush_tlb_mm() 195 unsigned int pid; in __local_flush_tlb_page() local 198 pid = mm ? mm->context.id : 0; in __local_flush_tlb_page() 199 if (pid != MMU_NO_CONTEXT) in __local_flush_tlb_page() 200 _tlbil_va(vmaddr, pid, tsize, ind); in __local_flush_tlb_page() 220 unsigned int pid; member 229 _tlbil_pid(p ? p->pid : 0); in do_flush_tlb_mm_ipi() [all …]
|
/arch/um/drivers/ |
D | slirp_user.c | 40 int pid; in slirp_tramp() local 44 pid = run_helper(slirp_pre_exec, &pe_data, argv); in slirp_tramp() 46 return pid; in slirp_tramp() 52 int fds[2], pid, err; in slirp_open() local 63 pid = err; in slirp_open() 68 pri->pid = err; in slirp_open() 87 if (pri->pid<1) { in slirp_close() 94 if (kill(pri->pid, SIGHUP)<0) { in slirp_close() 96 "(%d)\n", pri->pid, errno); in slirp_close() 99 err = helper_wait(pri->pid); in slirp_close() [all …]
|
D | xterm.c | 19 int pid; member 34 *data = ((struct xterm_chan) { .pid = -1, in xterm_init() 88 int pid, fd, new, err; in xterm_open() local 137 pid = run_helper(NULL, NULL, argv); in xterm_open() 138 if (pid < 0) { in xterm_open() 139 err = pid; in xterm_open() 182 data->pid = pid; in xterm_open() 190 os_kill_process(pid, 1); in xterm_open() 201 if (data->pid != -1) in xterm_close() 202 os_kill_process(data->pid, 1); in xterm_close() [all …]
|
D | ubd_user.c | 26 int pid, fds[2], err; in start_io_thread() local 43 pid = clone(io_thread, (void *) sp, CLONE_FILES | CLONE_VM, NULL); in start_io_thread() 44 if(pid < 0){ in start_io_thread() 50 return(pid); in start_io_thread()
|
D | harddog_user.c | 33 int in_fds[2], out_fds[2], pid, n, err; in start_watchdog() local 67 pid = run_helper(pre_exec, &data, args); in start_watchdog() 72 if (pid < 0) { in start_watchdog() 73 err = -pid; in start_watchdog() 81 helper_wait(pid); in start_watchdog() 88 helper_wait(pid); in start_watchdog()
|
D | xterm_kern.c | 16 int pid; member 25 fd = os_rcv_fd(xterm->fd, &xterm->pid); in xterm_interrupt() 48 .pid = -1, in xterm_fd() 70 *pid_out = data->pid; in xterm_fd()
|
/arch/x86/um/ |
D | ptrace_user.c | 9 int ptrace_getregs(long pid, unsigned long *regs_out) in ptrace_getregs() argument 11 if (ptrace(PTRACE_GETREGS, pid, 0, regs_out) < 0) in ptrace_getregs() 16 int ptrace_setregs(long pid, unsigned long *regs) in ptrace_setregs() argument 18 if (ptrace(PTRACE_SETREGS, pid, 0, regs) < 0) in ptrace_setregs()
|
D | syscalls_64.c | 17 int pid = task->mm->context.id.u.pid; in arch_prctl() local 35 ret = restore_registers(pid, ¤t->thread.regs.regs); in arch_prctl() 52 ret = os_arch_prctl(pid, code, ptr); in arch_prctl() 59 ret = save_registers(pid, ¤t->thread.regs.regs); in arch_prctl() 62 ret = save_registers(pid, ¤t->thread.regs.regs); in arch_prctl()
|
/arch/cris/arch-v32/kernel/ |
D | ptrace.c | 29 static int put_debugreg(long pid, unsigned int regno, long data); 30 static long get_debugreg(long pid, unsigned int regno); 32 void deconfigure_bp(long pid); 53 ret = get_debugreg(task->pid, regno); in get_reg() 74 return put_debugreg(task->pid, regno, data); in put_reg() 101 if (!get_debugreg(child->pid, PT_BP_CTRL)) { in user_disable_single_step() 122 deconfigure_bp(child->pid); in ptrace_disable() 337 void deconfigure_bp(long pid) in deconfigure_bp() argument 342 if (bp_owner != pid) in deconfigure_bp() 348 put_debugreg(pid, PT_BP + 3 + (bp * 2), 0); in deconfigure_bp() [all …]
|
/arch/um/kernel/ |
D | reboot.c | 20 int pid; in kill_off_processes() local 29 pid = t->mm->context.id.u.pid; in kill_off_processes() 31 os_kill_ptraced_process(pid, 1); in kill_off_processes()
|
/arch/um/kernel/skas/ |
D | process.c | 17 int pid; in start_kernel_proc() local 20 pid = os_getpid(); in start_kernel_proc() 22 cpu_tasks[0].pid = pid; in start_kernel_proc()
|
D | mmu.c | 67 to_mm->id.u.pid = copy_context_skas0(stack, in init_new_context() 68 from_mm->id.u.pid); in init_new_context() 69 else to_mm->id.u.pid = start_userspace(stack); in init_new_context() 72 if (to_mm->id.u.pid < 0) { in init_new_context() 73 ret = to_mm->id.u.pid; in init_new_context() 149 if (mmu->id.u.pid < 2) { in destroy_context() 151 mmu->id.u.pid); in destroy_context() 154 os_kill_ptraced_process(mmu->id.u.pid, 1); in destroy_context()
|
/arch/sh/mm/ |
D | asids-debugfs.c | 33 int pid = p->pid; in asids_seq_show() local 35 if (unlikely(!pid)) in asids_seq_show() 39 seq_printf(file, "%5d : %04lx\n", pid, in asids_seq_show()
|
/arch/mips/kernel/ |
D | mips-mt-fpaff.c | 38 static inline struct task_struct *find_process_by_pid(pid_t pid) in find_process_by_pid() argument 40 return pid ? find_task_by_vpid(pid) : current; in find_process_by_pid() 62 asmlinkage long mipsmt_sys_sched_setaffinity(pid_t pid, unsigned int len, in mipsmt_sys_sched_setaffinity() argument 79 p = find_process_by_pid(pid); in mipsmt_sys_sched_setaffinity() 153 asmlinkage long mipsmt_sys_sched_getaffinity(pid_t pid, unsigned int len, in mipsmt_sys_sched_getaffinity() argument 169 p = find_process_by_pid(pid); in mipsmt_sys_sched_getaffinity()
|