[PATCH 1/2] utrace: finish_resume_report: don't do user_xxx_step() if ptrace_wants_step()

2011-07-01 Thread Oleg Nesterov
finish_resume_report() should not enable/disable the stepping if ptrace_wants_step() == T. If ptrace wants block_step while utrace wants single_step we could promote the stepping, but I do not think this really makes sense. Unless the tracee is killed this can't race with ptrace, this is called

[PATCH 2/2] ptrace: shift user_*_step() from ptrace_resume() to ptrace_stop()

2011-07-01 Thread Oleg Nesterov
1. ptrace_resume() plays with the stopped task which can be also task_is_utraced(). In this case user_enable_xxx_step() can race with utrace_reset()-user_disable_single_step(). We could change utrace_reset() to check ptrace_wants_step() and add the task_utrace_lock + unlock barrier