Lines Matching refs:child

135 static inline unsigned long __peek_user_per(struct task_struct *child,  in __peek_user_per()  argument
143 PER_EVENT_IFETCH : child->thread.per_user.control; in __peek_user_per()
147 0 : child->thread.per_user.start; in __peek_user_per()
151 PSW_ADDR_INSN : child->thread.per_user.end; in __peek_user_per()
158 return child->thread.per_user.start; in __peek_user_per()
161 return child->thread.per_user.end; in __peek_user_per()
165 child->thread.per_event.cause << (BITS_PER_LONG - 16); in __peek_user_per()
168 return child->thread.per_event.address; in __peek_user_per()
172 child->thread.per_event.paid << (BITS_PER_LONG - 8); in __peek_user_per()
185 static unsigned long __peek_user(struct task_struct *child, addr_t addr) in __peek_user() argument
194 tmp = *(addr_t *)((addr_t) &task_pt_regs(child)->psw + addr); in __peek_user()
212 tmp = ((unsigned long) child->thread.acrs[15]) << 32; in __peek_user()
214 tmp = *(addr_t *)((addr_t) &child->thread.acrs + offset); in __peek_user()
220 tmp = (addr_t) task_pt_regs(child)->orig_gpr2; in __peek_user()
233 tmp = child->thread.fpu.fpc; in __peek_user()
244 ((addr_t) child->thread.fpu.vxrs + 2*offset); in __peek_user()
247 ((addr_t) child->thread.fpu.fprs + offset); in __peek_user()
254 tmp = __peek_user_per(child, addr); in __peek_user()
263 peek_user(struct task_struct *child, addr_t addr, addr_t data) in peek_user() argument
278 tmp = __peek_user(child, addr); in peek_user()
282 static inline void __poke_user_per(struct task_struct *child, in __poke_user_per() argument
301 child->thread.per_user.control = in __poke_user_per()
305 child->thread.per_user.start = data; in __poke_user_per()
308 child->thread.per_user.end = data; in __poke_user_per()
317 static int __poke_user(struct task_struct *child, addr_t addr, addr_t data) in __poke_user() argument
329 mask |= is_ri_task(child) ? PSW_MASK_RI : 0; in __poke_user()
340 *(addr_t *)((addr_t) &task_pt_regs(child)->psw + addr) = data; in __poke_user()
354 child->thread.acrs[15] = (unsigned int) (data >> 32); in __poke_user()
356 *(addr_t *)((addr_t) &child->thread.acrs + offset) = data; in __poke_user()
362 task_pt_regs(child)->orig_gpr2 = data; in __poke_user()
378 child->thread.fpu.fpc = data >> (BITS_PER_LONG - 32); in __poke_user()
388 child->thread.fpu.vxrs + 2*offset) = data; in __poke_user()
391 child->thread.fpu.fprs + offset) = data; in __poke_user()
398 __poke_user_per(child, addr, data); in __poke_user()
405 static int poke_user(struct task_struct *child, addr_t addr, addr_t data) in poke_user() argument
420 return __poke_user(child, addr, data); in poke_user()
423 long arch_ptrace(struct task_struct *child, long request, in arch_ptrace() argument
432 return peek_user(child, addr, data); in arch_ptrace()
436 return poke_user(child, addr, data); in arch_ptrace()
448 ret = peek_user(child, addr, data); in arch_ptrace()
454 ret = poke_user(child, addr, utmp); in arch_ptrace()
464 put_user(task_thread_info(child)->last_break, in arch_ptrace()
470 child->thread.per_flags &= ~PER_FLAG_NO_TE; in arch_ptrace()
475 child->thread.per_flags |= PER_FLAG_NO_TE; in arch_ptrace()
476 child->thread.per_flags &= ~PER_FLAG_TE_ABORT_RAND; in arch_ptrace()
479 if (!MACHINE_HAS_TE || (child->thread.per_flags & PER_FLAG_NO_TE)) in arch_ptrace()
483 child->thread.per_flags &= ~PER_FLAG_TE_ABORT_RAND; in arch_ptrace()
486 child->thread.per_flags |= PER_FLAG_TE_ABORT_RAND; in arch_ptrace()
487 child->thread.per_flags |= PER_FLAG_TE_ABORT_RAND_TEND; in arch_ptrace()
490 child->thread.per_flags |= PER_FLAG_TE_ABORT_RAND; in arch_ptrace()
491 child->thread.per_flags &= ~PER_FLAG_TE_ABORT_RAND_TEND; in arch_ptrace()
500 return ptrace_request(child, request, addr, data); in arch_ptrace()
522 static inline __u32 __peek_user_per_compat(struct task_struct *child, in __peek_user_per_compat() argument
530 PER_EVENT_IFETCH : child->thread.per_user.control; in __peek_user_per_compat()
534 0 : child->thread.per_user.start; in __peek_user_per_compat()
538 PSW32_ADDR_INSN : child->thread.per_user.end; in __peek_user_per_compat()
545 return (__u32) child->thread.per_user.start; in __peek_user_per_compat()
548 return (__u32) child->thread.per_user.end; in __peek_user_per_compat()
551 return (__u32) child->thread.per_event.cause << 16; in __peek_user_per_compat()
554 return (__u32) child->thread.per_event.address; in __peek_user_per_compat()
557 return (__u32) child->thread.per_event.paid << 24; in __peek_user_per_compat()
564 static u32 __peek_user_compat(struct task_struct *child, addr_t addr) in __peek_user_compat() argument
571 struct pt_regs *regs = task_pt_regs(child); in __peek_user_compat()
593 tmp = *(__u32*)((addr_t) &child->thread.acrs + offset); in __peek_user_compat()
599 tmp = *(__u32*)((addr_t) &task_pt_regs(child)->orig_gpr2 + 4); in __peek_user_compat()
612 tmp = child->thread.fpu.fpc; in __peek_user_compat()
622 ((addr_t) child->thread.fpu.vxrs + 2*offset); in __peek_user_compat()
625 ((addr_t) child->thread.fpu.fprs + offset); in __peek_user_compat()
632 tmp = __peek_user_per_compat(child, addr); in __peek_user_compat()
640 static int peek_user_compat(struct task_struct *child, in peek_user_compat() argument
648 tmp = __peek_user_compat(child, addr); in peek_user_compat()
655 static inline void __poke_user_per_compat(struct task_struct *child, in __poke_user_per_compat() argument
662 child->thread.per_user.control = in __poke_user_per_compat()
666 child->thread.per_user.start = data; in __poke_user_per_compat()
669 child->thread.per_user.end = data; in __poke_user_per_compat()
675 static int __poke_user_compat(struct task_struct *child, in __poke_user_compat() argument
683 struct pt_regs *regs = task_pt_regs(child); in __poke_user_compat()
690 mask |= is_ri_task(child) ? PSW32_MASK_RI : 0; in __poke_user_compat()
716 *(__u32*)((addr_t) &child->thread.acrs + offset) = tmp; in __poke_user_compat()
722 *(__u32*)((addr_t) &task_pt_regs(child)->orig_gpr2 + 4) = tmp; in __poke_user_compat()
737 child->thread.fpu.fpc = data; in __poke_user_compat()
747 child->thread.fpu.vxrs + 2*offset) = tmp; in __poke_user_compat()
750 child->thread.fpu.fprs + offset) = tmp; in __poke_user_compat()
757 __poke_user_per_compat(child, addr, data); in __poke_user_compat()
763 static int poke_user_compat(struct task_struct *child, in poke_user_compat() argument
770 return __poke_user_compat(child, addr, data); in poke_user_compat()
773 long compat_arch_ptrace(struct task_struct *child, compat_long_t request, in compat_arch_ptrace() argument
784 return peek_user_compat(child, addr, data); in compat_arch_ptrace()
788 return poke_user_compat(child, addr, data); in compat_arch_ptrace()
800 ret = peek_user_compat(child, addr, data); in compat_arch_ptrace()
806 ret = poke_user_compat(child, addr, utmp); in compat_arch_ptrace()
816 put_user(task_thread_info(child)->last_break, in compat_arch_ptrace()
820 return compat_ptrace_request(child, request, addr, data); in compat_arch_ptrace()