Re: [PATCH 2/3] ptrace_stop: remove the wrong ->group_stop_count bookkeeping

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Eric W. Biederman <ebiederm@...>
Cc: Andrew Morton <akpm@...>, Davide Libenzi <davidel@...>, Ingo Molnar <mingo@...>, Linus Torvalds <torvalds@...>, Roland McGrath <roland@...>, <linux-kernel@...>
Date: Sunday, December 9, 2007 - 10:05 am

On 12/08, Eric W. Biederman wrote:

Looking further, I think it was done to match the !is_task_stopped_or_traced()
check in do_signal_stop().

Still, I don't understand why we really need this decrement. The ptrace interface
needs only per-thread TASK_TRACED ot TASK_STOPPED, it doesn't need the completion
of the group stop. We can delay the completion of the group stop, but why this is
bad? At worse, the tracer recieves the extra CLD_STOPPED when the tracee resumes.
And do_signal_stop() probably can s/is_task_stopped_or_traced/is_task_stopped/.

OK, it is better to ignore this patch, I don't understand all implications of this
change. But this all doesn't look very good. Suppose we have a lot of threads and
the task with _TIF_SYSCALL_TRACE does system call. So ptrace_notify() decrements
the counter before syscall, after, and before the return to user-space.

Hopefully Roland can clarify.

Oleg.

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH 2/3] ptrace_stop: remove the wrong ->group_sto..., Oleg Nesterov, (Sun Dec 9, 10:05 am)