Lines Matching refs:child
147 static inline unsigned long __peek_user_per(struct task_struct *child, in __peek_user_per() argument
155 PER_EVENT_IFETCH : child->thread.per_user.control; in __peek_user_per()
159 0 : child->thread.per_user.start; in __peek_user_per()
163 PSW_ADDR_INSN : child->thread.per_user.end; in __peek_user_per()
170 return child->thread.per_user.start; in __peek_user_per()
173 return child->thread.per_user.end; in __peek_user_per()
177 child->thread.per_event.cause << (BITS_PER_LONG - 16); in __peek_user_per()
180 return child->thread.per_event.address; in __peek_user_per()
184 child->thread.per_event.paid << (BITS_PER_LONG - 8); in __peek_user_per()
197 static unsigned long __peek_user(struct task_struct *child, addr_t addr) in __peek_user() argument
206 tmp = *(addr_t *)((addr_t) &task_pt_regs(child)->psw + addr); in __peek_user()
224 tmp = ((unsigned long) child->thread.acrs[15]) << 32; in __peek_user()
226 tmp = *(addr_t *)((addr_t) &child->thread.acrs + offset); in __peek_user()
232 tmp = (addr_t) task_pt_regs(child)->orig_gpr2; in __peek_user()
245 tmp = child->thread.fp_regs.fpc; in __peek_user()
254 if (child->thread.vxrs) in __peek_user()
256 ((addr_t) child->thread.vxrs + 2*offset); in __peek_user()
259 ((addr_t) &child->thread.fp_regs.fprs + offset); in __peek_user()
266 tmp = __peek_user_per(child, addr); in __peek_user()
275 peek_user(struct task_struct *child, addr_t addr, addr_t data) in peek_user() argument
290 tmp = __peek_user(child, addr); in peek_user()
294 static inline void __poke_user_per(struct task_struct *child, in __poke_user_per() argument
313 child->thread.per_user.control = in __poke_user_per()
317 child->thread.per_user.start = data; in __poke_user_per()
320 child->thread.per_user.end = data; in __poke_user_per()
329 static int __poke_user(struct task_struct *child, addr_t addr, addr_t data) in __poke_user() argument
341 mask |= is_ri_task(child) ? PSW_MASK_RI : 0; in __poke_user()
352 *(addr_t *)((addr_t) &task_pt_regs(child)->psw + addr) = data; in __poke_user()
366 child->thread.acrs[15] = (unsigned int) (data >> 32); in __poke_user()
368 *(addr_t *)((addr_t) &child->thread.acrs + offset) = data; in __poke_user()
374 task_pt_regs(child)->orig_gpr2 = data; in __poke_user()
390 child->thread.fp_regs.fpc = data >> (BITS_PER_LONG - 32); in __poke_user()
398 if (child->thread.vxrs) in __poke_user()
400 child->thread.vxrs + 2*offset) = data; in __poke_user()
403 &child->thread.fp_regs.fprs + offset) = data; in __poke_user()
410 __poke_user_per(child, addr, data); in __poke_user()
417 static int poke_user(struct task_struct *child, addr_t addr, addr_t data) in poke_user() argument
432 return __poke_user(child, addr, data); in poke_user()
435 long arch_ptrace(struct task_struct *child, long request, in arch_ptrace() argument
444 return peek_user(child, addr, data); in arch_ptrace()
448 return poke_user(child, addr, data); in arch_ptrace()
460 ret = peek_user(child, addr, data); in arch_ptrace()
466 ret = poke_user(child, addr, utmp); in arch_ptrace()
476 put_user(task_thread_info(child)->last_break, in arch_ptrace()
482 child->thread.per_flags &= ~PER_FLAG_NO_TE; in arch_ptrace()
487 child->thread.per_flags |= PER_FLAG_NO_TE; in arch_ptrace()
488 child->thread.per_flags &= ~PER_FLAG_TE_ABORT_RAND; in arch_ptrace()
491 if (!MACHINE_HAS_TE || (child->thread.per_flags & PER_FLAG_NO_TE)) in arch_ptrace()
495 child->thread.per_flags &= ~PER_FLAG_TE_ABORT_RAND; in arch_ptrace()
498 child->thread.per_flags |= PER_FLAG_TE_ABORT_RAND; in arch_ptrace()
499 child->thread.per_flags |= PER_FLAG_TE_ABORT_RAND_TEND; in arch_ptrace()
502 child->thread.per_flags |= PER_FLAG_TE_ABORT_RAND; in arch_ptrace()
503 child->thread.per_flags &= ~PER_FLAG_TE_ABORT_RAND_TEND; in arch_ptrace()
512 return ptrace_request(child, request, addr, data); in arch_ptrace()
534 static inline __u32 __peek_user_per_compat(struct task_struct *child, in __peek_user_per_compat() argument
542 PER_EVENT_IFETCH : child->thread.per_user.control; in __peek_user_per_compat()
546 0 : child->thread.per_user.start; in __peek_user_per_compat()
550 PSW32_ADDR_INSN : child->thread.per_user.end; in __peek_user_per_compat()
557 return (__u32) child->thread.per_user.start; in __peek_user_per_compat()
560 return (__u32) child->thread.per_user.end; in __peek_user_per_compat()
563 return (__u32) child->thread.per_event.cause << 16; in __peek_user_per_compat()
566 return (__u32) child->thread.per_event.address; in __peek_user_per_compat()
569 return (__u32) child->thread.per_event.paid << 24; in __peek_user_per_compat()
576 static u32 __peek_user_compat(struct task_struct *child, addr_t addr) in __peek_user_compat() argument
583 struct pt_regs *regs = task_pt_regs(child); in __peek_user_compat()
605 tmp = *(__u32*)((addr_t) &child->thread.acrs + offset); in __peek_user_compat()
611 tmp = *(__u32*)((addr_t) &task_pt_regs(child)->orig_gpr2 + 4); in __peek_user_compat()
624 tmp = child->thread.fp_regs.fpc; in __peek_user_compat()
632 if (child->thread.vxrs) in __peek_user_compat()
634 ((addr_t) child->thread.vxrs + 2*offset); in __peek_user_compat()
637 ((addr_t) &child->thread.fp_regs.fprs + offset); in __peek_user_compat()
644 tmp = __peek_user_per_compat(child, addr); in __peek_user_compat()
652 static int peek_user_compat(struct task_struct *child, in peek_user_compat() argument
660 tmp = __peek_user_compat(child, addr); in peek_user_compat()
667 static inline void __poke_user_per_compat(struct task_struct *child, in __poke_user_per_compat() argument
674 child->thread.per_user.control = in __poke_user_per_compat()
678 child->thread.per_user.start = data; in __poke_user_per_compat()
681 child->thread.per_user.end = data; in __poke_user_per_compat()
687 static int __poke_user_compat(struct task_struct *child, in __poke_user_compat() argument
695 struct pt_regs *regs = task_pt_regs(child); in __poke_user_compat()
702 mask |= is_ri_task(child) ? PSW32_MASK_RI : 0; in __poke_user_compat()
728 *(__u32*)((addr_t) &child->thread.acrs + offset) = tmp; in __poke_user_compat()
734 *(__u32*)((addr_t) &task_pt_regs(child)->orig_gpr2 + 4) = tmp; in __poke_user_compat()
749 child->thread.fp_regs.fpc = data; in __poke_user_compat()
757 if (child->thread.vxrs) in __poke_user_compat()
759 child->thread.vxrs + 2*offset) = tmp; in __poke_user_compat()
762 &child->thread.fp_regs.fprs + offset) = tmp; in __poke_user_compat()
769 __poke_user_per_compat(child, addr, data); in __poke_user_compat()
775 static int poke_user_compat(struct task_struct *child, in poke_user_compat() argument
782 return __poke_user_compat(child, addr, data); in poke_user_compat()
785 long compat_arch_ptrace(struct task_struct *child, compat_long_t request, in compat_arch_ptrace() argument
796 return peek_user_compat(child, addr, data); in compat_arch_ptrace()
800 return poke_user_compat(child, addr, data); in compat_arch_ptrace()
812 ret = peek_user_compat(child, addr, data); in compat_arch_ptrace()
818 ret = poke_user_compat(child, addr, utmp); in compat_arch_ptrace()
828 put_user(task_thread_info(child)->last_break, in compat_arch_ptrace()
832 return compat_ptrace_request(child, request, addr, data); in compat_arch_ptrace()