/kernel/linux/linux-6.6/arch/powerpc/kernel/ptrace/ |
H A D | ptrace-adv.c | 74 int ptrace_get_debugreg(struct task_struct *child, unsigned long addr, in ptrace_get_debugreg() argument 80 return put_user(child->thread.debug.dac1, datalp); in ptrace_get_debugreg() 140 static long set_instruction_bp(struct task_struct *child, in set_instruction_bp() argument 144 int slot1_in_use = ((child->thread.debug.dbcr0 & DBCR0_IAC1) != 0); in set_instruction_bp() 145 int slot2_in_use = ((child->thread.debug.dbcr0 & DBCR0_IAC2) != 0); in set_instruction_bp() 146 int slot3_in_use = ((child->thread.debug.dbcr0 & DBCR0_IAC3) != 0); in set_instruction_bp() 147 int slot4_in_use = ((child->thread.debug.dbcr0 & DBCR0_IAC4) != 0); in set_instruction_bp() 149 if (dbcr_iac_range(child) & DBCR_IAC12MODE) in set_instruction_bp() 151 if (dbcr_iac_range(child) & DBCR_IAC34MODE) in set_instruction_bp() 165 child in set_instruction_bp() 229 del_instruction_bp(struct task_struct *child, int slot) del_instruction_bp() argument 284 set_dac(struct task_struct *child, struct ppc_hw_breakpoint *bp_info) set_dac() argument 345 del_dac(struct task_struct *child, int slot) del_dac() argument 386 set_dac_range(struct task_struct *child, struct ppc_hw_breakpoint *bp_info) set_dac_range() argument 440 ppc_set_hwdebug(struct task_struct *child, struct ppc_hw_breakpoint *bp_info) ppc_set_hwdebug() argument 476 ppc_del_hwdebug(struct task_struct *child, long data) ppc_del_hwdebug() argument [all...] |
/kernel/linux/linux-5.10/arch/powerpc/kernel/ptrace/ |
H A D | ptrace-adv.c | 74 int ptrace_get_debugreg(struct task_struct *child, unsigned long addr, in ptrace_get_debugreg() argument 80 return put_user(child->thread.debug.dac1, datalp); in ptrace_get_debugreg() 139 static long set_instruction_bp(struct task_struct *child, in set_instruction_bp() argument 143 int slot1_in_use = ((child->thread.debug.dbcr0 & DBCR0_IAC1) != 0); in set_instruction_bp() 144 int slot2_in_use = ((child->thread.debug.dbcr0 & DBCR0_IAC2) != 0); in set_instruction_bp() 145 int slot3_in_use = ((child->thread.debug.dbcr0 & DBCR0_IAC3) != 0); in set_instruction_bp() 146 int slot4_in_use = ((child->thread.debug.dbcr0 & DBCR0_IAC4) != 0); in set_instruction_bp() 148 if (dbcr_iac_range(child) & DBCR_IAC12MODE) in set_instruction_bp() 150 if (dbcr_iac_range(child) & DBCR_IAC34MODE) in set_instruction_bp() 164 child in set_instruction_bp() 228 del_instruction_bp(struct task_struct *child, int slot) del_instruction_bp() argument 283 set_dac(struct task_struct *child, struct ppc_hw_breakpoint *bp_info) set_dac() argument 344 del_dac(struct task_struct *child, int slot) del_dac() argument 385 set_dac_range(struct task_struct *child, struct ppc_hw_breakpoint *bp_info) set_dac_range() argument 439 ppc_set_hwdebug(struct task_struct *child, struct ppc_hw_breakpoint *bp_info) ppc_set_hwdebug() argument 475 ppc_del_hwdebug(struct task_struct *child, long data) ppc_del_hwdebug() argument [all...] |
H A D | ptrace32.c | 27 * does not yet catch signals sent when the child dies. 36 long compat_arch_ptrace(struct task_struct *child, compat_long_t request, in compat_arch_ptrace() argument 65 copied = ptrace_access_vm(child, (u64)addrOthers, &tmp, in compat_arch_ptrace() 84 CHECK_FULL_REGS(child->thread.regs); in compat_arch_ptrace() 86 ret = ptrace_get_reg(child, index, &tmp); in compat_arch_ptrace() 90 flush_fp_to_thread(child); in compat_arch_ptrace() 96 tmp = ((unsigned int *)child->thread.fp_state.fpr) in compat_arch_ptrace() 134 CHECK_FULL_REGS(child->thread.regs); in compat_arch_ptrace() 136 flush_fp_to_thread(child); in compat_arch_ptrace() 138 tmp = child in compat_arch_ptrace() [all...] |
/kernel/linux/linux-6.6/drivers/mtd/ |
H A D | mtdpart.c | 50 struct mtd_info *child; in allocate_partition() local 56 child = kzalloc(sizeof(*child), GFP_KERNEL); in allocate_partition() 58 if (!name || !child) { in allocate_partition() 62 kfree(child); in allocate_partition() 67 child->type = parent->type; in allocate_partition() 68 child->part.flags = parent->flags & ~part->mask_flags; in allocate_partition() 69 child->part.flags |= part->add_flags; in allocate_partition() 70 child->flags = child in allocate_partition() 252 struct mtd_info *child; mtd_add_partition() local 307 struct mtd_info *child, *next; __mtd_del_partition() local 332 struct mtd_info *child, *next; __del_mtd_partitions() local 369 struct mtd_info *child, *master = mtd_get_master(mtd); mtd_del_partition() local 398 struct mtd_info *child, *master = mtd_get_master(parent); add_mtd_partitions() local 581 struct device_node *child; mtd_part_of_parse() local [all...] |
/kernel/linux/linux-5.10/drivers/mtd/ |
H A D | mtdpart.c | 43 struct mtd_info *child; in allocate_partition() local 49 child = kzalloc(sizeof(*child), GFP_KERNEL); in allocate_partition() 51 if (!name || !child) { in allocate_partition() 55 kfree(child); in allocate_partition() 60 child->type = parent->type; in allocate_partition() 61 child->part.flags = parent->flags & ~part->mask_flags; in allocate_partition() 62 child->part.flags |= part->add_flags; in allocate_partition() 63 child->flags = child in allocate_partition() 246 struct mtd_info *child; mtd_add_partition() local 301 struct mtd_info *child, *next; __mtd_del_partition() local 328 struct mtd_info *child, *next; __del_mtd_partitions() local 368 struct mtd_info *child, *master = mtd_get_master(mtd); mtd_del_partition() local 397 struct mtd_info *child, *master = mtd_get_master(parent); add_mtd_partitions() local [all...] |
/kernel/linux/linux-6.6/arch/x86/kernel/ |
H A D | step.c | 12 unsigned long convert_ip_to_linear(struct task_struct *child, struct pt_regs *regs) in convert_ip_to_linear() argument 36 mutex_lock(&child->mm->context.lock); in convert_ip_to_linear() 37 if (unlikely(!child->mm->context.ldt || in convert_ip_to_linear() 38 seg >= child->mm->context.ldt->nr_entries)) in convert_ip_to_linear() 41 desc = &child->mm->context.ldt->entries[seg]; in convert_ip_to_linear() 49 mutex_unlock(&child->mm->context.lock); in convert_ip_to_linear() 56 static int is_setting_trap_flag(struct task_struct *child, struct pt_regs *regs) in is_setting_trap_flag() argument 60 unsigned long addr = convert_ip_to_linear(child, regs); in is_setting_trap_flag() 62 copied = access_process_vm(child, addr, opcode, sizeof(opcode), in is_setting_trap_flag() 111 static int enable_single_step(struct task_struct *child) in enable_single_step() argument 202 enable_step(struct task_struct *child, bool block) enable_step() argument 217 user_enable_single_step(struct task_struct *child) user_enable_single_step() argument 222 user_enable_block_step(struct task_struct *child) user_enable_block_step() argument 227 user_disable_single_step(struct task_struct *child) user_disable_single_step() argument [all...] |
/kernel/linux/linux-5.10/arch/x86/kernel/ |
H A D | step.c | 12 unsigned long convert_ip_to_linear(struct task_struct *child, struct pt_regs *regs) in convert_ip_to_linear() argument 36 mutex_lock(&child->mm->context.lock); in convert_ip_to_linear() 37 if (unlikely(!child->mm->context.ldt || in convert_ip_to_linear() 38 seg >= child->mm->context.ldt->nr_entries)) in convert_ip_to_linear() 41 desc = &child->mm->context.ldt->entries[seg]; in convert_ip_to_linear() 49 mutex_unlock(&child->mm->context.lock); in convert_ip_to_linear() 56 static int is_setting_trap_flag(struct task_struct *child, struct pt_regs *regs) in is_setting_trap_flag() argument 60 unsigned long addr = convert_ip_to_linear(child, regs); in is_setting_trap_flag() 62 copied = access_process_vm(child, addr, opcode, sizeof(opcode), in is_setting_trap_flag() 111 static int enable_single_step(struct task_struct *child) in enable_single_step() argument 197 enable_step(struct task_struct *child, bool block) enable_step() argument 212 user_enable_single_step(struct task_struct *child) user_enable_single_step() argument 217 user_enable_block_step(struct task_struct *child) user_enable_block_step() argument 222 user_disable_single_step(struct task_struct *child) user_disable_single_step() argument [all...] |
/kernel/linux/linux-6.6/tools/testing/selftests/bpf/prog_tests/ |
H A D | uprobe_multi_test.c | 28 struct child { struct 33 static void release_child(struct child *child) in release_child() argument 37 if (!child) in release_child() 39 close(child->go[1]); in release_child() 40 close(child->go[0]); in release_child() 41 if (child->pid > 0) in release_child() 42 waitpid(child->pid, &child_status, 0); in release_child() 45 static void kick_child(struct child *child) in kick_child() argument 58 static struct child child; spawn_child() local 92 uprobe_multi_test_run(struct uprobe_multi *skel, struct child *child) uprobe_multi_test_run() argument 153 __test_attach_api(const char *binary, const char *pattern, struct bpf_uprobe_multi_opts *opts, struct child *child) __test_attach_api() argument 202 struct child *child; test_attach_api() local 237 __test_link_api(struct child *child) __test_link_api() argument 316 struct child *child; test_link_api() local [all...] |
/kernel/linux/linux-5.10/kernel/ |
H A D | ptrace.c | 67 void __ptrace_link(struct task_struct *child, struct task_struct *new_parent, in __ptrace_link() argument 70 BUG_ON(!list_empty(&child->ptrace_entry)); in __ptrace_link() 71 list_add(&child->ptrace_entry, &new_parent->ptraced); in __ptrace_link() 72 child->parent = new_parent; in __ptrace_link() 73 child->ptracer_cred = get_cred(ptracer_cred); in __ptrace_link() 82 static void ptrace_link(struct task_struct *child, struct task_struct *new_parent) in ptrace_link() argument 84 __ptrace_link(child, new_parent, current_cred()); in ptrace_link() 89 * @child: ptracee to be unlinked 91 * Remove @child from the ptrace list, move it back to the original parent, 115 void __ptrace_unlink(struct task_struct *child) in __ptrace_unlink() argument 245 ptrace_check_attach(struct task_struct *child, bool ignore_state) ptrace_check_attach() argument 587 ptrace_detach(struct task_struct *child, unsigned int data) ptrace_detach() argument 683 ptrace_setoptions(struct task_struct *child, unsigned long data) ptrace_setoptions() argument 701 ptrace_getsiginfo(struct task_struct *child, kernel_siginfo_t *info) ptrace_getsiginfo() argument 717 ptrace_setsiginfo(struct task_struct *child, const kernel_siginfo_t *info) ptrace_setsiginfo() argument 733 ptrace_peek_siginfo(struct task_struct *child, unsigned long addr, unsigned long data) ptrace_peek_siginfo() argument 833 ptrace_resume(struct task_struct *child, long request, unsigned long data) ptrace_resume() argument 936 ptrace_get_syscall_info_entry(struct task_struct *child, struct pt_regs *regs, struct ptrace_syscall_info *info) ptrace_get_syscall_info_entry() argument 953 ptrace_get_syscall_info_seccomp(struct task_struct *child, struct pt_regs *regs, struct ptrace_syscall_info *info) ptrace_get_syscall_info_seccomp() argument 972 ptrace_get_syscall_info_exit(struct task_struct *child, struct pt_regs *regs, struct ptrace_syscall_info *info) ptrace_get_syscall_info_exit() argument 986 ptrace_get_syscall_info(struct task_struct *child, unsigned long user_size, void __user *datavp) ptrace_get_syscall_info() argument 1029 ptrace_request(struct task_struct *child, long request, unsigned long addr, unsigned long data) ptrace_request() argument 1271 struct task_struct *child; SYSCALL_DEFINE4() local 1337 compat_ptrace_request(struct task_struct *child, compat_long_t request, compat_ulong_t addr, compat_ulong_t data) compat_ptrace_request() argument 1418 struct task_struct *child; COMPAT_SYSCALL_DEFINE4() local [all...] |
/kernel/linux/linux-6.6/kernel/ |
H A D | ptrace.c | 69 void __ptrace_link(struct task_struct *child, struct task_struct *new_parent, in __ptrace_link() argument 72 BUG_ON(!list_empty(&child->ptrace_entry)); in __ptrace_link() 73 list_add(&child->ptrace_entry, &new_parent->ptraced); in __ptrace_link() 74 child->parent = new_parent; in __ptrace_link() 75 child->ptracer_cred = get_cred(ptracer_cred); in __ptrace_link() 84 static void ptrace_link(struct task_struct *child, struct task_struct *new_parent) in ptrace_link() argument 86 __ptrace_link(child, new_parent, current_cred()); in ptrace_link() 91 * @child: ptracee to be unlinked 93 * Remove @child from the ptrace list, move it back to the original parent, 117 void __ptrace_unlink(struct task_struct *child) in __ptrace_unlink() argument 250 ptrace_check_attach(struct task_struct *child, bool ignore_state) ptrace_check_attach() argument 583 ptrace_detach(struct task_struct *child, unsigned int data) ptrace_detach() argument 679 ptrace_setoptions(struct task_struct *child, unsigned long data) ptrace_setoptions() argument 697 ptrace_getsiginfo(struct task_struct *child, kernel_siginfo_t *info) ptrace_getsiginfo() argument 713 ptrace_setsiginfo(struct task_struct *child, const kernel_siginfo_t *info) ptrace_setsiginfo() argument 729 ptrace_peek_siginfo(struct task_struct *child, unsigned long addr, unsigned long data) ptrace_peek_siginfo() argument 843 ptrace_resume(struct task_struct *child, long request, unsigned long data) ptrace_resume() argument 938 ptrace_get_syscall_info_entry(struct task_struct *child, struct pt_regs *regs, struct ptrace_syscall_info *info) ptrace_get_syscall_info_entry() argument 955 ptrace_get_syscall_info_seccomp(struct task_struct *child, struct pt_regs *regs, struct ptrace_syscall_info *info) ptrace_get_syscall_info_seccomp() argument 974 ptrace_get_syscall_info_exit(struct task_struct *child, struct pt_regs *regs, struct ptrace_syscall_info *info) ptrace_get_syscall_info_exit() argument 988 ptrace_get_syscall_info(struct task_struct *child, unsigned long user_size, void __user *datavp) ptrace_get_syscall_info() argument 1031 ptrace_request(struct task_struct *child, long request, unsigned long addr, unsigned long data) ptrace_request() argument 1281 struct task_struct *child; SYSCALL_DEFINE4() local 1339 compat_ptrace_request(struct task_struct *child, compat_long_t request, compat_ulong_t addr, compat_ulong_t data) compat_ptrace_request() argument 1420 struct task_struct *child; COMPAT_SYSCALL_DEFINE4() local [all...] |
/kernel/linux/linux-6.6/tools/testing/selftests/arm64/fp/ |
H A D | fp-stress.c | 60 static void child_start(struct child_data *child, const char *program) in child_start() argument 70 child->pid = fork(); in child_start() 71 if (child->pid == -1) in child_start() 75 if (!child->pid) { in child_start() 77 * In child, replace stdout with the pipe, errors to in child_start() 124 * In parent, remember the child and close our copy of the in child_start() 128 child->stdout = pipefd[0]; in child_start() 129 child->output = NULL; in child_start() 130 child->exited = false; in child_start() 131 child in child_start() 144 child_output_read(struct child_data *child) child_output_read() argument 197 child_output(struct child_data *child, uint32_t events, bool flush) child_output() argument 221 child_tickle(struct child_data *child) child_tickle() argument 227 child_stop(struct child_data *child) child_stop() argument 233 child_cleanup(struct child_data *child) child_cleanup() argument 309 start_fpsimd(struct child_data *child, int cpu, int copy) start_fpsimd() argument 322 start_sve(struct child_data *child, int vl, int cpu) start_sve() argument 339 start_ssve(struct child_data *child, int vl, int cpu) start_ssve() argument 356 start_za(struct child_data *child, int vl, int cpu) start_za() argument 373 start_zt(struct child_data *child, int cpu) start_zt() argument [all...] |
/kernel/linux/linux-6.6/tools/testing/selftests/powerpc/ptrace/ |
H A D | ptrace.h | 64 int start_trace(pid_t child) in start_trace() argument 68 ret = ptrace(PTRACE_ATTACH, child, NULL, NULL); in start_trace() 73 ret = waitpid(child, NULL, 0); in start_trace() 74 if (ret != child) { in start_trace() 81 int stop_trace(pid_t child) in stop_trace() argument 85 ret = ptrace(PTRACE_DETACH, child, NULL, NULL); in stop_trace() 93 int cont_trace(pid_t child) in cont_trace() argument 97 ret = ptrace(PTRACE_CONT, child, NULL, NULL); in cont_trace() 105 int ptrace_read_regs(pid_t child, unsigned long type, unsigned long regs[], in ptrace_read_regs() argument 111 FAIL_IF(start_trace(child)); in ptrace_read_regs() 125 ptrace_write_regs(pid_t child, unsigned long type, unsigned long regs[], int n) ptrace_write_regs() argument 144 show_tar_registers(pid_t child, unsigned long *out) show_tar_registers() argument 189 write_tar_registers(pid_t child, unsigned long tar, unsigned long ppr, unsigned long dscr) write_tar_registers() argument 233 show_tm_checkpointed_state(pid_t child, unsigned long *out) show_tm_checkpointed_state() argument 280 write_ckpt_tar_registers(pid_t child, unsigned long tar, unsigned long ppr, unsigned long dscr) write_ckpt_tar_registers() argument 325 show_fpr(pid_t child, __u64 *fpr) show_fpr() argument 344 write_fpr(pid_t child, __u64 val) write_fpr() argument 367 show_ckpt_fpr(pid_t child, __u64 *fpr) show_ckpt_fpr() argument 391 write_ckpt_fpr(pid_t child, unsigned long val) write_ckpt_fpr() argument 419 show_gpr(pid_t child, unsigned long *gpr) show_gpr() argument 452 peek_fprs(pid_t child) peek_fprs() argument 483 poke_fprs(pid_t child, unsigned long *fprs) poke_fprs() argument 508 write_gpr(pid_t child, unsigned long val) write_gpr() argument 536 show_ckpt_gpr(pid_t child, unsigned long *gpr) show_ckpt_gpr() argument 565 write_ckpt_gpr(pid_t child, unsigned long val) write_ckpt_gpr() argument 597 show_vmx(pid_t child, unsigned long vmx[][2]) show_vmx() argument 609 show_vmx_ckpt(pid_t child, unsigned long vmx[][2]) show_vmx_ckpt() argument 627 write_vmx(pid_t child, unsigned long vmx[][2]) write_vmx() argument 639 write_vmx_ckpt(pid_t child, unsigned long vmx[][2]) write_vmx_ckpt() argument 657 show_vsx(pid_t child, unsigned long *vsx) show_vsx() argument 669 show_vsx_ckpt(pid_t child, unsigned long *vsx) show_vsx_ckpt() argument 686 write_vsx(pid_t child, unsigned long *vsx) write_vsx() argument 698 write_vsx_ckpt(pid_t child, unsigned long *vsx) write_vsx_ckpt() argument 716 show_tm_spr(pid_t child, struct tm_spr_regs *out) show_tm_spr() argument [all...] |
/kernel/linux/linux-5.10/drivers/mfd/ |
H A D | twl-core.c | 711 struct device *child; in add_children() local 714 child = add_child(TWL4030_MODULE_GPIO, "twl4030_gpio", in add_children() 717 if (IS_ERR(child)) in add_children() 718 return PTR_ERR(child); in add_children() 722 child = add_child(TWL4030_MODULE_KEYPAD, "twl4030_keypad", in add_children() 725 if (IS_ERR(child)) in add_children() 726 return PTR_ERR(child); in add_children() 731 child = add_child(TWL4030_MODULE_MADC, "twl4030_madc", in add_children() 734 if (IS_ERR(child)) in add_children() 735 return PTR_ERR(child); in add_children() [all...] |
/kernel/linux/linux-5.10/arch/mips/kernel/ |
H A D | ptrace32.c | 43 long compat_arch_ptrace(struct task_struct *child, compat_long_t request, in compat_arch_ptrace() argument 73 copied = ptrace_access_vm(child, (u64)addrOthers, &tmp, in compat_arch_ptrace() 86 regs = task_pt_regs(child); in compat_arch_ptrace() 97 if (!tsk_used_math(child)) { in compat_arch_ptrace() 102 fregs = get_fpu_regs(child); in compat_arch_ptrace() 103 if (test_tsk_thread_flag(child, TIF_32BIT_FPREGS)) { in compat_arch_ptrace() 117 tmp = child->thread.fpu.fcr31; in compat_arch_ptrace() 147 dregs = __get_dsp_regs(child); in compat_arch_ptrace() 157 tmp = child->thread.dsp.dspcontrol; in compat_arch_ptrace() 186 if (ptrace_access_vm(child, (u6 in compat_arch_ptrace() [all...] |
/kernel/linux/linux-6.6/arch/mips/kernel/ |
H A D | ptrace32.c | 43 long compat_arch_ptrace(struct task_struct *child, compat_long_t request, in compat_arch_ptrace() argument 73 copied = ptrace_access_vm(child, (u64)addrOthers, &tmp, in compat_arch_ptrace() 86 regs = task_pt_regs(child); in compat_arch_ptrace() 97 if (!tsk_used_math(child)) { in compat_arch_ptrace() 102 fregs = get_fpu_regs(child); in compat_arch_ptrace() 103 if (test_tsk_thread_flag(child, TIF_32BIT_FPREGS)) { in compat_arch_ptrace() 117 tmp = child->thread.fpu.fcr31; in compat_arch_ptrace() 147 dregs = __get_dsp_regs(child); in compat_arch_ptrace() 157 tmp = child->thread.dsp.dspcontrol; in compat_arch_ptrace() 186 if (ptrace_access_vm(child, (u6 in compat_arch_ptrace() [all...] |
/kernel/linux/linux-5.10/tools/perf/arch/x86/tests/ |
H A D | bp-modify.c | 32 int child = fork(); in spawn_child() local 34 if (child == 0) { in spawn_child() 36 * The child sets itself for as tracee and in spawn_child() 52 return child; in spawn_child() 61 pid_t child; in bp_modify1() local 65 child = spawn_child(); in bp_modify1() 67 waitpid(child, &status, 0); in bp_modify1() 79 * - detaches the child in bp_modify1() 81 if (ptrace(PTRACE_POKEUSER, child, in bp_modify1() 88 if (ptrace(PTRACE_POKEUSER, child, in bp_modify1() 138 pid_t child; bp_modify2() local [all...] |
/kernel/linux/linux-6.6/tools/perf/arch/x86/tests/ |
H A D | bp-modify.c | 32 int child = fork(); in spawn_child() local 34 if (child == 0) { in spawn_child() 36 * The child sets itself for as tracee and in spawn_child() 52 return child; in spawn_child() 61 pid_t child; in bp_modify1() local 65 child = spawn_child(); in bp_modify1() 67 waitpid(child, &status, 0); in bp_modify1() 79 * - detaches the child in bp_modify1() 81 if (ptrace(PTRACE_POKEUSER, child, in bp_modify1() 88 if (ptrace(PTRACE_POKEUSER, child, in bp_modify1() 138 pid_t child; bp_modify2() local [all...] |
/kernel/linux/linux-5.10/tools/testing/selftests/powerpc/ptrace/ |
H A D | ptrace.h | 60 int start_trace(pid_t child) in start_trace() argument 64 ret = ptrace(PTRACE_ATTACH, child, NULL, NULL); in start_trace() 69 ret = waitpid(child, NULL, 0); in start_trace() 70 if (ret != child) { in start_trace() 77 int stop_trace(pid_t child) in stop_trace() argument 81 ret = ptrace(PTRACE_DETACH, child, NULL, NULL); in stop_trace() 89 int cont_trace(pid_t child) in cont_trace() argument 93 ret = ptrace(PTRACE_CONT, child, NULL, NULL); in cont_trace() 101 int ptrace_read_regs(pid_t child, unsigned long type, unsigned long regs[], in ptrace_read_regs() argument 107 FAIL_IF(start_trace(child)); in ptrace_read_regs() 121 ptrace_write_regs(pid_t child, unsigned long type, unsigned long regs[], int n) ptrace_write_regs() argument 140 show_tar_registers(pid_t child, unsigned long *out) show_tar_registers() argument 185 write_tar_registers(pid_t child, unsigned long tar, unsigned long ppr, unsigned long dscr) write_tar_registers() argument 229 show_tm_checkpointed_state(pid_t child, unsigned long *out) show_tm_checkpointed_state() argument 276 write_ckpt_tar_registers(pid_t child, unsigned long tar, unsigned long ppr, unsigned long dscr) write_ckpt_tar_registers() argument 321 show_fpr(pid_t child, unsigned long *fpr) show_fpr() argument 340 write_fpr(pid_t child, unsigned long val) write_fpr() argument 363 show_ckpt_fpr(pid_t child, unsigned long *fpr) show_ckpt_fpr() argument 387 write_ckpt_fpr(pid_t child, unsigned long val) write_ckpt_fpr() argument 415 show_gpr(pid_t child, unsigned long *gpr) show_gpr() argument 440 write_gpr(pid_t child, unsigned long val) write_gpr() argument 468 show_ckpt_gpr(pid_t child, unsigned long *gpr) show_ckpt_gpr() argument 497 write_ckpt_gpr(pid_t child, unsigned long val) write_ckpt_gpr() argument 529 show_vmx(pid_t child, unsigned long vmx[][2]) show_vmx() argument 541 show_vmx_ckpt(pid_t child, unsigned long vmx[][2]) show_vmx_ckpt() argument 559 write_vmx(pid_t child, unsigned long vmx[][2]) write_vmx() argument 571 write_vmx_ckpt(pid_t child, unsigned long vmx[][2]) write_vmx_ckpt() argument 589 show_vsx(pid_t child, unsigned long *vsx) show_vsx() argument 601 show_vsx_ckpt(pid_t child, unsigned long *vsx) show_vsx_ckpt() argument 618 write_vsx(pid_t child, unsigned long *vsx) write_vsx() argument 630 write_vsx_ckpt(pid_t child, unsigned long *vsx) write_vsx_ckpt() argument 648 show_tm_spr(pid_t child, struct tm_spr_regs *out) show_tm_spr() argument [all...] |
/kernel/linux/linux-5.10/arch/m68k/kernel/ |
H A D | ptrace.c | 29 * does not yet catch signals sent when the child dies. 126 static inline void singlestep_disable(struct task_struct *child) in singlestep_disable() argument 128 unsigned long tmp = get_reg(child, PT_SR) & ~TRACE_BITS; in singlestep_disable() 129 put_reg(child, PT_SR, tmp); in singlestep_disable() 130 clear_tsk_thread_flag(child, TIF_DELAYED_TRACE); in singlestep_disable() 136 void ptrace_disable(struct task_struct *child) in ptrace_disable() argument 138 singlestep_disable(child); in ptrace_disable() 141 void user_enable_single_step(struct task_struct *child) in user_enable_single_step() argument 143 unsigned long tmp = get_reg(child, PT_SR) & ~TRACE_BITS; in user_enable_single_step() 144 put_reg(child, PT_S in user_enable_single_step() 149 user_enable_block_step(struct task_struct *child) user_enable_block_step() argument 156 user_disable_single_step(struct task_struct *child) user_disable_single_step() argument 161 arch_ptrace(struct task_struct *child, long request, unsigned long addr, unsigned long data) arch_ptrace() argument [all...] |
/kernel/linux/linux-5.10/arch/um/kernel/ |
H A D | ptrace.c | 13 void user_enable_single_step(struct task_struct *child) in user_enable_single_step() argument 15 set_tsk_thread_flag(child, TIF_SINGLESTEP); in user_enable_single_step() 16 child->thread.singlestep_syscall = 0; in user_enable_single_step() 19 SUBARCH_SET_SINGLESTEPPING(child, 1); in user_enable_single_step() 23 void user_disable_single_step(struct task_struct *child) in user_disable_single_step() argument 25 clear_tsk_thread_flag(child, TIF_SINGLESTEP); in user_disable_single_step() 26 child->thread.singlestep_syscall = 0; in user_disable_single_step() 29 SUBARCH_SET_SINGLESTEPPING(child, 0); in user_disable_single_step() 36 void ptrace_disable(struct task_struct *child) in ptrace_disable() argument 38 user_disable_single_step(child); in ptrace_disable() 44 arch_ptrace(struct task_struct *child, long request, unsigned long addr, unsigned long data) arch_ptrace() argument [all...] |
/kernel/linux/linux-6.6/arch/um/kernel/ |
H A D | ptrace.c | 12 void user_enable_single_step(struct task_struct *child) in user_enable_single_step() argument 14 set_tsk_thread_flag(child, TIF_SINGLESTEP); in user_enable_single_step() 15 child->thread.singlestep_syscall = 0; in user_enable_single_step() 18 SUBARCH_SET_SINGLESTEPPING(child, 1); in user_enable_single_step() 22 void user_disable_single_step(struct task_struct *child) in user_disable_single_step() argument 24 clear_tsk_thread_flag(child, TIF_SINGLESTEP); in user_disable_single_step() 25 child->thread.singlestep_syscall = 0; in user_disable_single_step() 28 SUBARCH_SET_SINGLESTEPPING(child, 0); in user_disable_single_step() 35 void ptrace_disable(struct task_struct *child) in ptrace_disable() argument 37 user_disable_single_step(child); in ptrace_disable() 43 arch_ptrace(struct task_struct *child, long request, unsigned long addr, unsigned long data) arch_ptrace() argument [all...] |
/kernel/linux/linux-5.10/arch/alpha/kernel/ |
H A D | ptrace.c | 43 * does not yet catch signals sent when the child dies. 178 ptrace_set_bpt(struct task_struct * child) in ptrace_set_bpt() argument 184 pc = get_reg(child, REG_PC); in ptrace_set_bpt() 185 res = read_int(child, pc, (int *) &insn); in ptrace_set_bpt() 200 task_thread_info(child)->bpt_addr[nsaved++] = pc + 4; in ptrace_set_bpt() 202 task_thread_info(child)->bpt_addr[nsaved++] in ptrace_set_bpt() 207 task_thread_info(child)->bpt_addr[nsaved++] = get_reg(child, reg_b); in ptrace_set_bpt() 210 task_thread_info(child)->bpt_addr[nsaved++] = pc + 4; in ptrace_set_bpt() 216 res = read_int(child, task_thread_inf in ptrace_set_bpt() 237 ptrace_cancel_bpt(struct task_struct * child) ptrace_cancel_bpt() argument 255 user_enable_single_step(struct task_struct *child) user_enable_single_step() argument 261 user_disable_single_step(struct task_struct *child) user_disable_single_step() argument 271 ptrace_disable(struct task_struct *child) ptrace_disable() argument 276 arch_ptrace(struct task_struct *child, long request, unsigned long addr, unsigned long data) arch_ptrace() argument [all...] |
/kernel/linux/linux-6.6/arch/alpha/kernel/ |
H A D | ptrace.c | 42 * does not yet catch signals sent when the child dies. 179 ptrace_set_bpt(struct task_struct * child) in ptrace_set_bpt() argument 185 pc = get_reg(child, REG_PC); in ptrace_set_bpt() 186 res = read_int(child, pc, (int *) &insn); in ptrace_set_bpt() 201 task_thread_info(child)->bpt_addr[nsaved++] = pc + 4; in ptrace_set_bpt() 203 task_thread_info(child)->bpt_addr[nsaved++] in ptrace_set_bpt() 208 task_thread_info(child)->bpt_addr[nsaved++] = get_reg(child, reg_b); in ptrace_set_bpt() 211 task_thread_info(child)->bpt_addr[nsaved++] = pc + 4; in ptrace_set_bpt() 217 res = read_int(child, task_thread_inf in ptrace_set_bpt() 238 ptrace_cancel_bpt(struct task_struct * child) ptrace_cancel_bpt() argument 256 user_enable_single_step(struct task_struct *child) user_enable_single_step() argument 262 user_disable_single_step(struct task_struct *child) user_disable_single_step() argument 272 ptrace_disable(struct task_struct *child) ptrace_disable() argument 277 arch_ptrace(struct task_struct *child, long request, unsigned long addr, unsigned long data) arch_ptrace() argument [all...] |
/kernel/linux/linux-5.10/tools/testing/selftests/ptrace/ |
H A D | peeksiginfo.c | 44 static int check_error_paths(pid_t child) in check_error_paths() argument 73 ret = sys_ptrace(PTRACE_PEEKSIGINFO, child, &arg, addr_rw); in check_error_paths() 83 ret = sys_ptrace(PTRACE_PEEKSIGINFO, child, &arg, in check_error_paths() 91 ret = sys_ptrace(PTRACE_PEEKSIGINFO, child, &arg, addr_ro); in check_error_paths() 105 int check_direct_path(pid_t child, int shared, int nr) in check_direct_path() argument 122 ret = sys_ptrace(PTRACE_PEEKSIGINFO, child, &arg, siginfo); in check_direct_path() 157 pid_t child; in main() local 163 child = fork(); in main() 164 if (child == -1) { in main() 167 } else if (child in main() [all...] |
/kernel/linux/linux-6.6/tools/testing/selftests/ptrace/ |
H A D | peeksiginfo.c | 44 static int check_error_paths(pid_t child) in check_error_paths() argument 73 ret = sys_ptrace(PTRACE_PEEKSIGINFO, child, &arg, addr_rw); in check_error_paths() 83 ret = sys_ptrace(PTRACE_PEEKSIGINFO, child, &arg, in check_error_paths() 91 ret = sys_ptrace(PTRACE_PEEKSIGINFO, child, &arg, addr_ro); in check_error_paths() 105 int check_direct_path(pid_t child, int shared, int nr) in check_direct_path() argument 122 ret = sys_ptrace(PTRACE_PEEKSIGINFO, child, &arg, siginfo); in check_direct_path() 157 pid_t child; in main() local 163 child = fork(); in main() 164 if (child == -1) { in main() 167 } else if (child in main() [all...] |