Home
last modified time | relevance | path

Searched full:child (Results 1 – 25 of 3472) sorted by relevance

12345678910>>...139

/kernel/linux/linux-5.10/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()
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->thread.debug.iac1 = bp_info->addr; in set_instruction_bp()
[all …]
/kernel/linux/linux-6.6/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 …]
/kernel/linux/linux-5.10/drivers/mtd/
Dmtdpart.c43 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->part.flags; in allocate_partition()
64 child->part.size = part->size; in allocate_partition()
65 child->writesize = parent->writesize; in allocate_partition()
[all …]
/kernel/linux/linux-6.6/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 …]
/kernel/linux/linux-6.6/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()
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
[all …]
/kernel/linux/linux-5.10/kernel/
Dptrace.c67 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
[all …]
/kernel/linux/linux-5.10/scripts/kconfig/
Dgconf.glade24 <child>
30 <child>
34 <child>
40 <child>
43 <child>
52 <child internal-child="image">
62 </child>
64 </child>
66 <child>
75 <child internal-child="image">
[all …]
/kernel/linux/linux-6.6/scripts/kconfig/
Dgconf.glade24 <child>
30 <child>
34 <child>
40 <child>
43 <child>
52 <child internal-child="image">
62 </child>
64 </child>
66 <child>
75 <child internal-child="image">
[all …]
/kernel/linux/linux-6.6/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 …]
/kernel/linux/linux-6.6/tools/testing/selftests/powerpc/ptrace/
Dptrace-perf-hwbreak.c13 * 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 …]
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 …]
/kernel/linux/linux-5.10/tools/testing/selftests/powerpc/ptrace/
Dptrace.h60 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()
[all …]
/kernel/linux/linux-6.6/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()
77 * In child, replace stdout with the pipe, errors to in child_start()
123 * In parent, remember the child and close our copy of the in child_start()
127 child->stdout = pipefd[0]; in child_start()
128 child->output = NULL; in child_start()
129 child->exited = false; in child_start()
130 child->output_seen = false; in child_start()
[all …]
/kernel/linux/linux-6.6/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 …]
/kernel/linux/linux-5.10/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 …]
/kernel/linux/linux-6.6/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 …]
/kernel/linux/linux-5.10/arch/um/kernel/
Dptrace.c13 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()
[all …]
/kernel/linux/linux-6.6/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 …]
/kernel/linux/linux-5.10/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 …]
/kernel/linux/linux-6.6/tools/perf/arch/x86/tests/
Dbp-modify.c32 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 …]
/kernel/linux/linux-5.10/tools/perf/arch/x86/tests/
Dbp-modify.c32 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 …]
/kernel/linux/linux-5.10/arch/m68k/kernel/
Dptrace.c29 * 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_SR, tmp | T1_BIT); in user_enable_single_step()
[all …]
/kernel/linux/linux-6.6/arch/m68k/kernel/
Dptrace.c30 * does not yet catch signals sent when the child dies.
127 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()
[all …]
/kernel/linux/linux-6.6/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 …]
/kernel/linux/linux-5.10/arch/x86/um/
Dptrace_32.c75 int putreg(struct task_struct *child, int regno, unsigned long value) in putreg() argument
91 UPT_SYSCALL_NR(&child->thread.regs.regs) = value; in putreg()
115 child->thread.regs.regs.gp[HOST_EFLAGS] |= value; in putreg()
120 child->thread.regs.regs.gp[reg_offsets[regno]] = value; in putreg()
124 int poke_user(struct task_struct *child, long addr, long data) in poke_user() argument
130 return putreg(child, addr, data); in poke_user()
137 child->thread.arch.debugregs[addr] = data; in poke_user()
143 unsigned long getreg(struct task_struct *child, int regno) in getreg() argument
172 return mask & child->thread.regs.regs.gp[reg_offsets[regno]]; in getreg()
176 int peek_user(struct task_struct *child, long addr, long data) in peek_user() argument
[all …]

12345678910>>...139