Lines Matching refs:child
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
115 struct pt_regs *regs = task_pt_regs(child); in enable_single_step()
128 if (unlikely(test_tsk_thread_flag(child, TIF_SINGLESTEP))) in enable_single_step()
135 set_tsk_thread_flag(child, TIF_SINGLESTEP); in enable_single_step()
141 set_task_syscall_work(child, SYSCALL_EXIT_TRAP); in enable_single_step()
157 if (is_setting_trap_flag(child, regs)) { in enable_single_step()
158 clear_tsk_thread_flag(child, TIF_FORCED_TF); in enable_single_step()
167 return test_tsk_thread_flag(child, TIF_FORCED_TF); in enable_single_step()
169 set_tsk_thread_flag(child, TIF_FORCED_TF); in enable_single_step()
204 static void enable_step(struct task_struct *child, bool block) in enable_step() argument
213 if (enable_single_step(child) && block) in enable_step()
214 set_task_blockstep(child, true); in enable_step()
215 else if (test_tsk_thread_flag(child, TIF_BLOCKSTEP)) in enable_step()
216 set_task_blockstep(child, false); in enable_step()
219 void user_enable_single_step(struct task_struct *child) in user_enable_single_step() argument
221 enable_step(child, 0); in user_enable_single_step()
224 void user_enable_block_step(struct task_struct *child) in user_enable_block_step() argument
226 enable_step(child, 1); in user_enable_block_step()
229 void user_disable_single_step(struct task_struct *child) in user_disable_single_step() argument
234 if (test_tsk_thread_flag(child, TIF_BLOCKSTEP)) in user_disable_single_step()
235 set_task_blockstep(child, false); in user_disable_single_step()
238 clear_tsk_thread_flag(child, TIF_SINGLESTEP); in user_disable_single_step()
239 clear_task_syscall_work(child, SYSCALL_EXIT_TRAP); in user_disable_single_step()
242 if (test_and_clear_tsk_thread_flag(child, TIF_FORCED_TF)) in user_disable_single_step()
243 task_pt_regs(child)->flags &= ~X86_EFLAGS_TF; in user_disable_single_step()