| /linux/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->thread.debug.iac1 = bp_info->addr; in set_instruction_bp() [all …]
|
| /linux/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 585 struct device_node *child; mtd_part_of_parse() local [all...] |
| /linux/scripts/kconfig/ |
| H A D | gconf.ui | 21 <child> 28 <child> 32 <child> 38 <child type="submenu"> 41 <child> 49 </child> 51 <child> 59 </child> 61 <child> 68 </child> [all …]
|
| /linux/tools/testing/selftests/powerpc/ptrace/ |
| H A D | ptrace-perf-hwbreak.c | 13 * Child subroutine that performs a load on the address, then traps 24 * Child subroutine that performs a load on the first address, then a load on 173 * Checks if we can place at least 2 watchpoints on the child process 186 * Wrapper around a plain fork() call that sets up the child for 187 * ptrace-ing. Both the parent and child return from this, though 188 * the child is stopped until ptrace_cont(pid) is run by the parent. 197 FAIL_IF_MSG(1, "Failed to fork child"); in ptrace_fork_child() 201 FAIL_IF_EXIT_MSG(raise(SIGSTOP), "Child failed to raise SIGSTOP"); in ptrace_fork_child() 203 /* Synchronise on child SIGSTOP */ in ptrace_fork_child() 204 FAIL_IF_MSG(waitpid(*pid, &status, 0) == -1, "Failed to wait for child"); in ptrace_fork_child() [all …]
|
| 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() [all …]
|
| H A D | ptrace-gpr.c | 22 static int child(void) in child() function 47 int trace_gpr(pid_t child) in trace_gpr() argument 52 FAIL_IF(start_trace(child)); in trace_gpr() 54 // Check child GPRs match what we expect using GETREGS in trace_gpr() 55 FAIL_IF(show_gpr(child, gpr)); in trace_gpr() 58 // Check child FPRs match what we expect using GETFPREGS in trace_gpr() 59 FAIL_IF(show_fpr(child, fpr)); in trace_gpr() 63 // Check child FPRs match what we expect using PEEKUSR in trace_gpr() 64 peeked_fprs = peek_fprs(child); in trace_gpr() 69 // Write child GPRs using SETREGS in trace_gpr() [all …]
|
| /linux/tools/testing/selftests/arm64/fp/ |
| H A D | fp-stress.c | 63 static void child_start(struct child_data *child, const char *program) in child_start() argument 73 child->pid = fork(); in child_start() 74 if (child->pid == -1) in child_start() 78 if (!child->pid) { in child_start() 80 * In child, replace stdout with the pipe, errors to in child_start() 126 * In parent, remember the child and close our copy of the in child_start() 130 child->stdout = pipefd[0]; in child_start() 131 child->output = NULL; in child_start() 132 child->exited = false; in child_start() 133 child->output_seen = false; in child_start() [all …]
|
| /linux/tools/testing/selftests/arm64/gcs/ |
| H A D | gcs-stress.c | 59 static void start_thread(struct child_data *child, int id) in start_thread() argument 69 child->pid = fork(); in start_thread() 70 if (child->pid == -1) in start_thread() 74 if (!child->pid) { in start_thread() 76 * In child, replace stdout with the pipe, errors to in start_thread() 123 * In parent, remember the child and close our copy of the in start_thread() 127 child->stdout = pipefd[0]; in start_thread() 128 child->output = NULL; in start_thread() 129 child->exited = false; in start_thread() 130 child->output_seen = false; in start_thread() [all …]
|
| /linux/arch/x86/kernel/ |
| H A D | step.c | 14 unsigned long convert_ip_to_linear(struct task_struct *child, struct pt_regs *regs) in convert_ip_to_linear() argument 38 mutex_lock(&child->mm->context.lock); in convert_ip_to_linear() 39 if (unlikely(!child->mm->context.ldt || in convert_ip_to_linear() 40 seg >= child->mm->context.ldt->nr_entries)) in convert_ip_to_linear() 43 desc = &child->mm->context.ldt->entries[seg]; in convert_ip_to_linear() 51 mutex_unlock(&child->mm->context.lock); in convert_ip_to_linear() 58 static int is_setting_trap_flag(struct task_struct *child, struct pt_regs *regs) in is_setting_trap_flag() argument 62 unsigned long addr = convert_ip_to_linear(child, regs); in is_setting_trap_flag() 64 copied = access_process_vm(child, addr, opcode, sizeof(opcode), in is_setting_trap_flag() 113 static int enable_single_step(struct task_struct *child) in enable_single_step() argument [all …]
|
| H A D | ptrace.c | 151 * does not yet catch signals sent when the child dies. 374 static int putreg(struct task_struct *child, in putreg() argument 384 return set_segment_reg(child, offset, value); in putreg() 387 return set_flags(child, value); in putreg() 393 x86_fsbase_write_task(child, value); in putreg() 398 x86_gsbase_write_task(child, value); in putreg() 403 *pt_regs_access(task_pt_regs(child), offset) = value; in putreg() 718 void ptrace_disable(struct task_struct *child) in ptrace_disable() argument 720 user_disable_single_step(child); in ptrace_disable() 730 long arch_ptrace(struct task_struct *child, long request, in arch_ptrace() argument [all …]
|
| /linux/tools/testing/selftests/bpf/prog_tests/ |
| H A D | uprobe_multi_test.c | 48 struct child { struct 50 int c2p[2]; /* child -> parent channel */ argument 57 static void release_child(struct child *child) in release_child() argument 61 if (!child) in release_child() 63 close(child->go[1]); in release_child() 64 close(child->go[0]); in release_child() 65 if (child->thread) in release_child() 66 pthread_join(child->thread, NULL); in release_child() 67 close(child->c2p[0]); in release_child() 68 close(child->c2p[1]); in release_child() [all …]
|
| /linux/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() [all …]
|
| /linux/arch/m68k/kernel/ |
| H A D | ptrace.c | 32 * does not yet catch signals sent when the child dies. 129 static inline void singlestep_disable(struct task_struct *child) in singlestep_disable() argument 131 unsigned long tmp = get_reg(child, PT_SR) & ~TRACE_BITS; in singlestep_disable() 132 put_reg(child, PT_SR, tmp); in singlestep_disable() 133 clear_tsk_thread_flag(child, TIF_DELAYED_TRACE); in singlestep_disable() 139 void ptrace_disable(struct task_struct *child) in ptrace_disable() argument 141 singlestep_disable(child); in ptrace_disable() 144 void user_enable_single_step(struct task_struct *child) in user_enable_single_step() argument 146 unsigned long tmp = get_reg(child, PT_SR) & ~TRACE_BITS; in user_enable_single_step() 147 put_reg(child, PT_SR, tmp | T1_BIT); in user_enable_single_step() [all …]
|
| /linux/arch/x86/um/ |
| H A D | ptrace_32.c | 51 int putreg(struct task_struct *child, int regno, unsigned long value) in putreg() argument 67 UPT_SYSCALL_NR(&child->thread.regs.regs) = value; in putreg() 91 child->thread.regs.regs.gp[HOST_EFLAGS] |= value; in putreg() 96 child->thread.regs.regs.gp[reg_offsets[regno]] = value; in putreg() 100 int poke_user(struct task_struct *child, long addr, long data) in poke_user() argument 106 return putreg(child, addr, data); in poke_user() 113 child->thread.arch.debugregs[addr] = data; in poke_user() 119 unsigned long getreg(struct task_struct *child, int regno) in getreg() argument 148 return mask & child->thread.regs.regs.gp[reg_offsets[regno]]; in getreg() 152 int peek_user(struct task_struct *child, long addr, long data) in peek_user() argument [all …]
|
| H A D | ptrace_64.c | 55 int putreg(struct task_struct *child, int regno, unsigned long value) in putreg() argument 79 UPT_SYSCALL_NR(&child->thread.regs.regs) = value; in putreg() 101 child->thread.regs.regs.gp[HOST_EFLAGS] |= value; in putreg() 108 child->thread.regs.regs.gp[reg_offsets[regno >> 3]] = value; in putreg() 112 int poke_user(struct task_struct *child, long addr, long data) in poke_user() argument 118 return putreg(child, addr, data); in poke_user() 125 child->thread.arch.debugregs[addr] = data; in poke_user() 131 unsigned long getreg(struct task_struct *child, int regno) in getreg() argument 169 return mask & child->thread.regs.regs.gp[reg_offsets[regno >> 3]]; in getreg() 172 int peek_user(struct task_struct *child, long addr, long data) in peek_user() argument [all …]
|
| /linux/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, (u64)addrOthers, &data, in compat_arch_ptrace() [all …]
|
| /linux/arch/um/kernel/ |
| H A D | ptrace.c | 15 void user_enable_single_step(struct task_struct *child) in user_enable_single_step() argument 17 set_tsk_thread_flag(child, TIF_SINGLESTEP); in user_enable_single_step() 20 SUBARCH_SET_SINGLESTEPPING(child, 1); in user_enable_single_step() 24 void user_disable_single_step(struct task_struct *child) in user_disable_single_step() argument 26 clear_tsk_thread_flag(child, TIF_SINGLESTEP); 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() 41 long arch_ptrace(struct task_struct *child, long request, in arch_ptrace() argument 51 ret = peek_user(child, addr, data); in arch_ptrace() [all …]
|
| /linux/tools/testing/selftests/arm64/abi/ |
| H A D | ptrace.c | 32 static void test_tpidr(pid_t child) in test_tpidr() argument 45 ret = ptrace(PTRACE_GETREGSET, child, NT_ARM_TLS, &read_iov); in test_tpidr() 51 ret = ptrace(PTRACE_SETREGSET, child, NT_ARM_TLS, &write_iov); in test_tpidr() 55 ret = ptrace(PTRACE_GETREGSET, child, NT_ARM_TLS, &read_iov); in test_tpidr() 61 ret = ptrace(PTRACE_GETREGSET, child, NT_ARM_TLS, &read_iov); in test_tpidr() 82 ret = ptrace(PTRACE_SETREGSET, child, NT_ARM_TLS, &write_iov); in test_tpidr() 90 ret = ptrace(PTRACE_GETREGSET, child, NT_ARM_TLS, &read_iov); in test_tpidr() 112 ret = ptrace(PTRACE_SETREGSET, child, NT_ARM_TLS, &write_iov); in test_tpidr() 117 ret = ptrace(PTRACE_GETREGSET, child, NT_ARM_TLS, in test_tpidr() 135 static void test_hw_debug(pid_t child, int type, const char *type_name) in test_hw_debug() argument [all …]
|
| /linux/drivers/net/mdio/ |
| H A D | fwnode_mdio.c | 72 struct fwnode_handle *child, u32 addr) in fwnode_mdiobus_phy_device_register() argument 76 rc = fwnode_irq_get(child, 0); in fwnode_mdiobus_phy_device_register() 92 if (fwnode_property_read_bool(child, "broken-turn-around")) in fwnode_mdiobus_phy_device_register() 98 fwnode_handle_get(child); in fwnode_mdiobus_phy_device_register() 99 device_set_node(&phy->mdio.dev, child); in fwnode_mdiobus_phy_device_register() 107 fwnode_handle_put(child); in fwnode_mdiobus_phy_device_register() 112 child, addr); in fwnode_mdiobus_phy_device_register() 118 struct fwnode_handle *child, u32 addr) in fwnode_mdiobus_phy_device_register() 127 mii_ts = fwnode_find_mii_timestamper(child); in fwnode_mdiobus_register_phy() 131 is_c45 = fwnode_device_is_compatible(child, "etherne in fwnode_mdiobus_register_phy() 123 fwnode_mdiobus_register_phy(struct mii_bus * bus,struct fwnode_handle * child,u32 addr) fwnode_mdiobus_register_phy() argument [all...] |
| /linux/tools/testing/selftests/cgroup/ |
| H A D | test_core.c | 79 * Create a child process that allocates and touches 100MB, then waits to be 80 * killed. Wait until the child is attached to the cgroup, kill all processes 107 /* wait for the child to enter cgroup */ in test_cgcore_destroy() 286 char *grandparent = NULL, *parent = NULL, *child = NULL; in test_cgcore_invalid_domain() local 293 child = cg_name(root, "cg_test_grandparent/cg_test_parent/cg_test_child"); in test_cgcore_invalid_domain() 294 if (!parent || !child || !grandparent) in test_cgcore_invalid_domain() 303 if (cg_create(child)) in test_cgcore_invalid_domain() 309 if (cg_read_strcmp(child, "cgroup.type", "domain invalid\n")) in test_cgcore_invalid_domain() 312 if (!cg_enter_current(child)) in test_cgcore_invalid_domain() 318 if (!clone_into_cgroup_run_wait(child)) in test_cgcore_invalid_domain() [all …]
|
| /linux/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_info(child)->bpt_addr[i], in ptrace_set_bpt() 221 task_thread_info(child)->bpt_insn[i] = insn; in ptrace_set_bpt() [all …]
|
| /linux/tools/testing/selftests/landlock/ |
| H A D | ptrace_test.c | 100 * Test multiple tracing combinations between a parent process P1 and a child 124 * Child domain 157 * Parent + child domain (siblings) 191 * Inherited + child domain 227 * Inherited + parent and child domain (siblings) 254 /* Test PTRACE_TRACEME and PTRACE_ATTACH for parent and child. */ in TEST_F() 257 pid_t child, parent; in TEST_F() 273 * can_read_child is true if a parent process can read its child in TEST_F() 275 * isolated from the child with a dedicated Landlock domain. in TEST_F() 280 * can_trace_child is true if a parent process can trace its child in TEST_F() 255 pid_t child, parent; TEST_F() local [all...] |
| /linux/tools/testing/selftests/pidfd/ |
| H A D | pidfd_getfd_test.c | 25 * UNKNOWN_FD is an fd number that should never exist in the child, as it is 48 fprintf(stderr, "%s: Child could not set DEATHSIG\n", in __child() 55 fprintf(stderr, "%s: Child failed to send fd number\n", in __child() 63 * This blocking recv enables the parent to message the child. in __child() 67 * indicating that the child should exit. in __child() 74 "%s: Child failed to disable ptrace\n", in __child() 79 fprintf(stderr, "Child received unknown command %c\n", in __child() 85 fprintf(stderr, "%s: Child failed to ack\n", in __child() 91 fprintf(stderr, "%s: Child failed to read from socket\n", in __child() 99 static int child(int sk) in child() function [all …]
|
| /linux/include/linux/ |
| H A D | property.h | 163 const struct fwnode_handle *fwnode, struct fwnode_handle *child); 165 const struct fwnode_handle *fwnode, struct fwnode_handle *child); 167 #define fwnode_for_each_child_node(fwnode, child) \ argument 168 for (child = fwnode_get_next_child_node(fwnode, NULL); child; \ 169 child = fwnode_get_next_child_node(fwnode, child)) 171 #define fwnode_for_each_named_child_node(fwnode, child, name) \ argument 172 fwnode_for_each_child_node(fwnode, child) \ 173 for_each_if(fwnode_name_eq(child, name)) 175 #define fwnode_for_each_available_child_node(fwnode, child) \ argument 176 for (child = fwnode_get_next_available_child_node(fwnode, NULL); child;\ [all …]
|
| /linux/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 == 0) { in main() [all …]
|