Home
last modified time | relevance | path

Searched refs:child (Results 1 – 25 of 1331) sorted by relevance

12345678910>>...54

/linux-6.6.21/arch/powerpc/kernel/ptrace/
Dptrace-adv.c74 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 …]
Dptrace32.c38 long compat_arch_ptrace(struct task_struct *child, compat_long_t request, in compat_arch_ptrace() argument
67 copied = ptrace_access_vm(child, (u64)addrOthers, &tmp, in compat_arch_ptrace()
87 ret = ptrace_get_reg(child, index, &tmp); in compat_arch_ptrace()
91 flush_fp_to_thread(child); in compat_arch_ptrace()
97 tmp = ((unsigned int *)child->thread.fp_state.fpr) in compat_arch_ptrace()
136 flush_fp_to_thread(child); in compat_arch_ptrace()
138 tmp = child->thread.fp_state.fpr[numReg - PT_FPR0][0]; in compat_arch_ptrace()
141 ret = ptrace_get_reg(child, numReg, &tmp2); in compat_arch_ptrace()
170 if (ptrace_access_vm(child, (u64)addrOthers, &tmp, in compat_arch_ptrace()
189 ret = ptrace_put_reg(child, index, data); in compat_arch_ptrace()
[all …]
/linux-6.6.21/drivers/mtd/
Dmtdpart.c50 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->part.flags; in allocate_partition()
71 child->part.size = part->size; in allocate_partition()
72 child->writesize = parent->writesize; in allocate_partition()
[all …]
/linux-6.6.21/arch/x86/kernel/
Dstep.c12 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
[all …]
/linux-6.6.21/kernel/
Dptrace.c69 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()
117 void __ptrace_unlink(struct task_struct *child) in __ptrace_unlink() argument
120 BUG_ON(!child->ptrace); in __ptrace_unlink()
122 clear_task_syscall_work(child, SYSCALL_TRACE); in __ptrace_unlink()
[all …]
/linux-6.6.21/tools/testing/selftests/arm64/fp/
Dfp-stress.c60 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()
128 child->stdout = pipefd[0]; in child_start()
129 child->output = NULL; in child_start()
130 child->exited = false; in child_start()
131 child->output_seen = false; in child_start()
134 ev.data.ptr = child; in child_start()
136 ret = epoll_ctl(epoll_fd, EPOLL_CTL_ADD, child->stdout, &ev); in child_start()
[all …]
/linux-6.6.21/tools/testing/selftests/bpf/prog_tests/
Duprobe_multi_test.c28 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
49 if (child) { in kick_child()
50 write(child->go[1], &c, 1); in kick_child()
[all …]
/linux-6.6.21/tools/testing/selftests/powerpc/ptrace/
Dptrace.h64 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 …]
/linux-6.6.21/arch/mips/kernel/
Dptrace32.c43 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-6.6.21/tools/perf/arch/x86/tests/
Dbp-modify.c32 int child = fork(); in spawn_child() local
34 if (child == 0) { 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()
81 if (ptrace(PTRACE_POKEUSER, child, in bp_modify1()
88 if (ptrace(PTRACE_POKEUSER, child, in bp_modify1()
95 if (ptrace(PTRACE_POKEUSER, child, in bp_modify1()
101 if (ptrace(PTRACE_CONT, child, NULL, NULL)) { in bp_modify1()
[all …]
/linux-6.6.21/arch/um/kernel/
Dptrace.c12 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()
[all …]
/linux-6.6.21/arch/m68k/kernel/
Dptrace.c127 static inline void singlestep_disable(struct task_struct *child) in singlestep_disable() argument
129 unsigned long tmp = get_reg(child, PT_SR) & ~TRACE_BITS; in singlestep_disable()
130 put_reg(child, PT_SR, tmp); in singlestep_disable()
131 clear_tsk_thread_flag(child, TIF_DELAYED_TRACE); in singlestep_disable()
137 void ptrace_disable(struct task_struct *child) in ptrace_disable() argument
139 singlestep_disable(child); in ptrace_disable()
142 void user_enable_single_step(struct task_struct *child) in user_enable_single_step() argument
144 unsigned long tmp = get_reg(child, PT_SR) & ~TRACE_BITS; in user_enable_single_step()
145 put_reg(child, PT_SR, tmp | T1_BIT); in user_enable_single_step()
146 set_tsk_thread_flag(child, TIF_DELAYED_TRACE); in user_enable_single_step()
[all …]
/linux-6.6.21/arch/alpha/kernel/
Dptrace.c179 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()
223 task_thread_info(child)->bpt_addr[i])); in ptrace_set_bpt()
[all …]
/linux-6.6.21/drivers/pwm/
Dsysfs.c18 struct device child; member
24 static struct pwm_export *child_to_pwm_export(struct device *child) in child_to_pwm_export() argument
26 return container_of(child, struct pwm_export, child); in child_to_pwm_export()
29 static struct pwm_device *child_to_pwm_device(struct device *child) in child_to_pwm_device() argument
31 struct pwm_export *export = child_to_pwm_export(child); in child_to_pwm_device()
36 static ssize_t period_show(struct device *child, in period_show() argument
40 const struct pwm_device *pwm = child_to_pwm_device(child); in period_show()
48 static ssize_t period_store(struct device *child, in period_store() argument
52 struct pwm_export *export = child_to_pwm_export(child); in period_store()
71 static ssize_t duty_cycle_show(struct device *child, in duty_cycle_show() argument
[all …]
/linux-6.6.21/arch/x86/um/
Dptrace_32.c76 int putreg(struct task_struct *child, int regno, unsigned long value) in putreg() argument
92 UPT_SYSCALL_NR(&child->thread.regs.regs) = value; in putreg()
116 child->thread.regs.regs.gp[HOST_EFLAGS] |= value; in putreg()
121 child->thread.regs.regs.gp[reg_offsets[regno]] = value; in putreg()
125 int poke_user(struct task_struct *child, long addr, long data) in poke_user() argument
131 return putreg(child, addr, data); in poke_user()
138 child->thread.arch.debugregs[addr] = data; in poke_user()
144 unsigned long getreg(struct task_struct *child, int regno) in getreg() argument
173 return mask & child->thread.regs.regs.gp[reg_offsets[regno]]; in getreg()
177 int peek_user(struct task_struct *child, long addr, long data) in peek_user() argument
[all …]
/linux-6.6.21/tools/testing/selftests/ptrace/
Dpeeksiginfo.c44 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 …]
/linux-6.6.21/drivers/net/mdio/
Dfwnode_mdio.c62 struct fwnode_handle *child, u32 addr) in fwnode_mdiobus_phy_device_register() argument
66 rc = fwnode_irq_get(child, 0); in fwnode_mdiobus_phy_device_register()
82 if (fwnode_property_read_bool(child, "broken-turn-around")) in fwnode_mdiobus_phy_device_register()
85 fwnode_property_read_u32(child, "reset-assert-us", in fwnode_mdiobus_phy_device_register()
87 fwnode_property_read_u32(child, "reset-deassert-us", in fwnode_mdiobus_phy_device_register()
93 fwnode_handle_get(child); in fwnode_mdiobus_phy_device_register()
94 device_set_node(&phy->mdio.dev, child); in fwnode_mdiobus_phy_device_register()
102 fwnode_handle_put(child); in fwnode_mdiobus_phy_device_register()
107 child, addr); in fwnode_mdiobus_phy_device_register()
113 struct fwnode_handle *child, u32 addr) in fwnode_mdiobus_register_phy() argument
[all …]
Dof_mdio.c37 struct device_node *child, u32 addr) in of_mdiobus_phy_device_register() argument
40 of_fwnode_handle(child), in of_mdiobus_phy_device_register()
46 struct device_node *child, u32 addr) in of_mdiobus_register_phy() argument
48 return fwnode_mdiobus_register_phy(mdio, of_fwnode_handle(child), addr); in of_mdiobus_register_phy()
52 struct device_node *child, u32 addr) in of_mdiobus_register_device() argument
54 struct fwnode_handle *fwnode = of_fwnode_handle(child); in of_mdiobus_register_device()
78 child, addr); in of_mdiobus_register_device()
114 bool of_mdiobus_child_is_phy(struct device_node *child) in of_mdiobus_child_is_phy() argument
118 if (of_get_phy_id(child, &phy_id) != -EINVAL) in of_mdiobus_child_is_phy()
121 if (of_device_is_compatible(child, "ethernet-phy-ieee802.3-c45")) in of_mdiobus_child_is_phy()
[all …]
/linux-6.6.21/tools/testing/selftests/arm64/abi/
Dptrace.c32 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-6.6.21/tools/testing/selftests/cgroup/
Dtest_core.c276 char *grandparent = NULL, *parent = NULL, *child = NULL; in test_cgcore_invalid_domain() local
280 child = cg_name(root, "cg_test_grandparent/cg_test_parent/cg_test_child"); in test_cgcore_invalid_domain()
281 if (!parent || !child || !grandparent) in test_cgcore_invalid_domain()
290 if (cg_create(child)) in test_cgcore_invalid_domain()
296 if (cg_read_strcmp(child, "cgroup.type", "domain invalid\n")) in test_cgcore_invalid_domain()
299 if (!cg_enter_current(child)) in test_cgcore_invalid_domain()
305 if (!clone_into_cgroup_run_wait(child)) in test_cgcore_invalid_domain()
319 if (child) in test_cgcore_invalid_domain()
320 cg_destroy(child); in test_cgcore_invalid_domain()
325 free(child); in test_cgcore_invalid_domain()
[all …]
/linux-6.6.21/include/linux/
Dptrace.h49 extern long arch_ptrace(struct task_struct *child, long request,
54 extern int ptrace_request(struct task_struct *child, long request,
57 extern void __ptrace_link(struct task_struct *child,
60 extern void __ptrace_unlink(struct task_struct *child);
90 static inline int ptrace_reparented(struct task_struct *child) in ptrace_reparented() argument
92 return !same_thread_group(child->real_parent, child->parent); in ptrace_reparented()
95 static inline void ptrace_unlink(struct task_struct *child) in ptrace_unlink() argument
97 if (unlikely(child->ptrace)) in ptrace_unlink()
98 __ptrace_unlink(child); in ptrace_unlink()
200 static inline void ptrace_init_task(struct task_struct *child, bool ptrace) in ptrace_init_task() argument
[all …]
Dbootconfig.h52 uint16_t child; member
104 return xbc_node_is_value(node) && node->child != 0; in xbc_node_is_array()
119 (!node->child || xbc_node_is_value(xbc_node_get_child(node))); in xbc_node_is_leaf()
173 struct xbc_node *child = xbc_node_get_child(node); in xbc_node_get_subkey() local
175 if (child && xbc_node_is_value(child)) in xbc_node_get_subkey()
176 return xbc_node_get_next(child); in xbc_node_get_subkey()
178 return child; in xbc_node_get_subkey()
203 #define xbc_node_for_each_child(parent, child) \ argument
204 for (child = xbc_node_get_child(parent); child != NULL ; \
205 child = xbc_node_get_next(child))
[all …]
/linux-6.6.21/fs/
Dpnode.c226 struct mount *child; in propagate_one() local
260 child = copy_tree(last_source, last_source->mnt.mnt_root, type); in propagate_one()
261 if (IS_ERR(child)) in propagate_one()
262 return PTR_ERR(child); in propagate_one()
264 mnt_set_mountpoint(m, dest_mp, child); in propagate_one()
269 last_source = child; in propagate_one()
270 hlist_add_head(&child->mnt_hash, list); in propagate_one()
271 return count_mounts(m->mnt_ns, child); in propagate_one()
337 struct mount *child; in find_topper() local
342 child = list_first_entry(&mnt->mnt_mounts, struct mount, mnt_child); in find_topper()
[all …]
/linux-6.6.21/arch/sh/kernel/
Dptrace_32.c110 void user_enable_single_step(struct task_struct *child) in user_enable_single_step() argument
112 unsigned long pc = get_stack_long(child, offsetof(struct pt_regs, pc)); in user_enable_single_step()
114 set_tsk_thread_flag(child, TIF_SINGLESTEP); in user_enable_single_step()
116 set_single_step(child, pc); in user_enable_single_step()
119 void user_disable_single_step(struct task_struct *child) in user_disable_single_step() argument
121 clear_tsk_thread_flag(child, TIF_SINGLESTEP); in user_disable_single_step()
129 void ptrace_disable(struct task_struct *child) in ptrace_disable() argument
131 user_disable_single_step(child); in ptrace_disable()
338 long arch_ptrace(struct task_struct *child, long request, in arch_ptrace() argument
355 tmp = get_stack_long(child, addr); in arch_ptrace()
[all …]
/linux-6.6.21/drivers/scsi/libsas/
Dsas_expander.c723 struct domain_device *child, in sas_ex_get_linkrate() argument
730 child->pathways = 0; in sas_ex_get_linkrate()
741 if (sas_phy_match_dev_addr(child, phy)) { in sas_ex_get_linkrate()
742 child->min_linkrate = min(parent->min_linkrate, in sas_ex_get_linkrate()
744 child->max_linkrate = max(parent->max_linkrate, in sas_ex_get_linkrate()
746 child->pathways++; in sas_ex_get_linkrate()
750 child->linkrate = min(parent_phy->linkrate, child->max_linkrate); in sas_ex_get_linkrate()
751 child->pathways = min(child->pathways, parent->pathways); in sas_ex_get_linkrate()
755 struct domain_device *child, int phy_id) in sas_ex_add_dev() argument
760 child->dev_type = SAS_END_DEVICE; in sas_ex_add_dev()
[all …]

12345678910>>...54