Lines Matching full:child

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
113 struct pt_regs *regs = task_pt_regs(child); in enable_single_step()
126 if (unlikely(test_tsk_thread_flag(child, TIF_SINGLESTEP))) in enable_single_step()
133 set_tsk_thread_flag(child, TIF_SINGLESTEP); in enable_single_step()
139 set_task_syscall_work(child, SYSCALL_EXIT_TRAP); in enable_single_step()
155 if (is_setting_trap_flag(child, regs)) { in enable_single_step()
156 clear_tsk_thread_flag(child, TIF_FORCED_TF); in enable_single_step()
165 return test_tsk_thread_flag(child, TIF_FORCED_TF); in enable_single_step()
167 set_tsk_thread_flag(child, TIF_FORCED_TF); in enable_single_step()
202 static void enable_step(struct task_struct *child, bool block) in enable_step() argument
211 if (enable_single_step(child) && block) in enable_step()
212 set_task_blockstep(child, true); in enable_step()
213 else if (test_tsk_thread_flag(child, TIF_BLOCKSTEP)) in enable_step()
214 set_task_blockstep(child, false); in enable_step()
217 void user_enable_single_step(struct task_struct *child) in user_enable_single_step() argument
219 enable_step(child, 0); in user_enable_single_step()
222 void user_enable_block_step(struct task_struct *child) in user_enable_block_step() argument
224 enable_step(child, 1); in user_enable_block_step()
227 void user_disable_single_step(struct task_struct *child) in user_disable_single_step() argument
232 if (test_tsk_thread_flag(child, TIF_BLOCKSTEP)) in user_disable_single_step()
233 set_task_blockstep(child, false); in user_disable_single_step()
236 clear_tsk_thread_flag(child, TIF_SINGLESTEP); in user_disable_single_step()
237 clear_task_syscall_work(child, SYSCALL_EXIT_TRAP); in user_disable_single_step()
240 if (test_and_clear_tsk_thread_flag(child, TIF_FORCED_TF)) in user_disable_single_step()
241 task_pt_regs(child)->flags &= ~X86_EFLAGS_TF; in user_disable_single_step()