Lines Matching full: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 -1UL : 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.fpu.fpc; in __peek_user()
250 * floating point regs. are either in child->thread.fpu in __peek_user()
251 * or the child->thread.fpu.vxrs array in __peek_user()
256 ((addr_t) child->thread.fpu.vxrs + 2*offset); in __peek_user()
259 ((addr_t) child->thread.fpu.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
336 struct pt_regs *regs = task_pt_regs(child); in __poke_user()
343 mask |= is_ri_task(child) ? PSW_MASK_RI : 0; in __poke_user()
357 struct pt_regs *regs = task_pt_regs(child); in __poke_user()
374 child->thread.acrs[15] = (unsigned int) (data >> 32); in __poke_user()
376 *(addr_t *)((addr_t) &child->thread.acrs + offset) = data; in __poke_user()
382 task_pt_regs(child)->orig_gpr2 = data; in __poke_user()
398 child->thread.fpu.fpc = data >> (BITS_PER_LONG - 32); in __poke_user()
402 * floating point regs. are either in child->thread.fpu in __poke_user()
403 * or the child->thread.fpu.vxrs array in __poke_user()
408 child->thread.fpu.vxrs + 2*offset) = data; in __poke_user()
411 child->thread.fpu.fprs + offset) = data; in __poke_user()
418 __poke_user_per(child, addr, data); in __poke_user()
425 static int poke_user(struct task_struct *child, addr_t addr, addr_t data) in poke_user() argument
440 return __poke_user(child, addr, data); in poke_user()
443 long arch_ptrace(struct task_struct *child, long request, in arch_ptrace() argument
452 return peek_user(child, addr, data); in arch_ptrace()
456 return poke_user(child, addr, data); in arch_ptrace()
468 ret = peek_user(child, addr, data); in arch_ptrace()
474 ret = poke_user(child, addr, utmp); in arch_ptrace()
484 put_user(child->thread.last_break, in arch_ptrace()
490 child->thread.per_flags &= ~PER_FLAG_NO_TE; in arch_ptrace()
495 child->thread.per_flags |= PER_FLAG_NO_TE; in arch_ptrace()
496 child->thread.per_flags &= ~PER_FLAG_TE_ABORT_RAND; in arch_ptrace()
499 if (!MACHINE_HAS_TE || (child->thread.per_flags & PER_FLAG_NO_TE)) in arch_ptrace()
503 child->thread.per_flags &= ~PER_FLAG_TE_ABORT_RAND; in arch_ptrace()
506 child->thread.per_flags |= PER_FLAG_TE_ABORT_RAND; in arch_ptrace()
507 child->thread.per_flags |= PER_FLAG_TE_ABORT_RAND_TEND; in arch_ptrace()
510 child->thread.per_flags |= PER_FLAG_TE_ABORT_RAND; in arch_ptrace()
511 child->thread.per_flags &= ~PER_FLAG_TE_ABORT_RAND_TEND; in arch_ptrace()
518 return ptrace_request(child, request, addr, data); in arch_ptrace()
540 static inline __u32 __peek_user_per_compat(struct task_struct *child, in __peek_user_per_compat() argument
548 PER_EVENT_IFETCH : child->thread.per_user.control; in __peek_user_per_compat()
552 0 : child->thread.per_user.start; in __peek_user_per_compat()
556 PSW32_ADDR_INSN : child->thread.per_user.end; in __peek_user_per_compat()
563 return (__u32) child->thread.per_user.start; in __peek_user_per_compat()
566 return (__u32) child->thread.per_user.end; in __peek_user_per_compat()
569 return (__u32) child->thread.per_event.cause << 16; in __peek_user_per_compat()
572 return (__u32) child->thread.per_event.address; in __peek_user_per_compat()
575 return (__u32) child->thread.per_event.paid << 24; in __peek_user_per_compat()
582 static u32 __peek_user_compat(struct task_struct *child, addr_t addr) in __peek_user_compat() argument
589 struct pt_regs *regs = task_pt_regs(child); in __peek_user_compat()
611 tmp = *(__u32*)((addr_t) &child->thread.acrs + offset); in __peek_user_compat()
617 tmp = *(__u32*)((addr_t) &task_pt_regs(child)->orig_gpr2 + 4); in __peek_user_compat()
630 tmp = child->thread.fpu.fpc; in __peek_user_compat()
634 * floating point regs. are either in child->thread.fpu in __peek_user_compat()
635 * or the child->thread.fpu.vxrs array in __peek_user_compat()
640 ((addr_t) child->thread.fpu.vxrs + 2*offset); in __peek_user_compat()
643 ((addr_t) child->thread.fpu.fprs + offset); in __peek_user_compat()
650 tmp = __peek_user_per_compat(child, addr); in __peek_user_compat()
658 static int peek_user_compat(struct task_struct *child, in peek_user_compat() argument
666 tmp = __peek_user_compat(child, addr); in peek_user_compat()
673 static inline void __poke_user_per_compat(struct task_struct *child, in __poke_user_per_compat() argument
680 child->thread.per_user.control = in __poke_user_per_compat()
684 child->thread.per_user.start = data; in __poke_user_per_compat()
687 child->thread.per_user.end = data; in __poke_user_per_compat()
693 static int __poke_user_compat(struct task_struct *child, in __poke_user_compat() argument
701 struct pt_regs *regs = task_pt_regs(child); in __poke_user_compat()
708 mask |= is_ri_task(child) ? PSW32_MASK_RI : 0; in __poke_user_compat()
728 struct pt_regs *regs = task_pt_regs(child); in __poke_user_compat()
740 *(__u32*)((addr_t) &child->thread.acrs + offset) = tmp; in __poke_user_compat()
746 *(__u32*)((addr_t) &task_pt_regs(child)->orig_gpr2 + 4) = tmp; in __poke_user_compat()
761 child->thread.fpu.fpc = data; in __poke_user_compat()
765 * floating point regs. are either in child->thread.fpu in __poke_user_compat()
766 * or the child->thread.fpu.vxrs array in __poke_user_compat()
771 child->thread.fpu.vxrs + 2*offset) = tmp; in __poke_user_compat()
774 child->thread.fpu.fprs + offset) = tmp; in __poke_user_compat()
781 __poke_user_per_compat(child, addr, data); in __poke_user_compat()
787 static int poke_user_compat(struct task_struct *child, in poke_user_compat() argument
794 return __poke_user_compat(child, addr, data); in poke_user_compat()
797 long compat_arch_ptrace(struct task_struct *child, compat_long_t request, in compat_arch_ptrace() argument
808 return peek_user_compat(child, addr, data); in compat_arch_ptrace()
812 return poke_user_compat(child, addr, data); in compat_arch_ptrace()
824 ret = peek_user_compat(child, addr, data); in compat_arch_ptrace()
830 ret = poke_user_compat(child, addr, utmp); in compat_arch_ptrace()
840 put_user(child->thread.last_break, in compat_arch_ptrace()
844 return compat_ptrace_request(child, request, addr, data); in compat_arch_ptrace()