On 10/28, Oleg Nesterov wrote: > > As for ptrace. If utrace_control(SINGLESTEP) doesn't set TIF_SINGLESTEP, > then we need more (probably nasty) changes. report_quiesce/interrupt should > somehow figure out whether we need send_sigtrap() if ->resume == XXXSTEP.
Or. We can add the hack below for V1, then fix/cleanup this. Oleg. --- a/kernel/ptrace-utrace.c +++ b/kernel/ptrace-utrace.c @@ -227,6 +227,14 @@ static void ptrace_wake_up(struct task_s } } + // XXX!!! temporary hack. + // this and ptrace_resume()->send_sigtrap() + // should not exist !!! + if (action = UTRACE_SINGLESTEP) + user_enable_single_step(tracee); + else if (action = UTRACE_BLOCKSTEP) + user_enable_block_step(tracee); + if (action != UTRACE_REPORT) ptrace_context(engine)->stop_code = 0; utrace_control(tracee, engine, action);