problem: utrace-ptrace jctl stacked stop

2009-09-17 Thread Oleg Nesterov
I seem to find the problem, and I do not see a simple solution. Will try to think more tomorrow with a fresh head, but perhaps you can help. looks like we need some changes in utrace/signal layer. Suppose that a tracee is going to report, say, PTRACE_EVENT_FORK. The callback returns UTRACE_STOP.

[PATCH 44-50] misc

2009-09-17 Thread Oleg Nesterov
Misc changes, more preparations for ptrace_report_signal(). Oleg.

[PATCH 44] remove the now unneeded code

2009-09-17 Thread Oleg Nesterov
Kill the now unneeded code. From now -ptrace is only used for PT_PTRACED and PT_PTRACE_CAP. --- kernel/ptrace.c | 281 +--- 1 file changed, 6 insertions(+), 275 deletions(-) --- PU/kernel/ptrace.c~44_KILL_OLD_CODE 2009-09-16

[PATCH 45] ptrace_report_quiesce() can't trust fatal_signal_pending()

2009-09-17 Thread Oleg Nesterov
SIGKILL can be already dequeued if we are called from do_exit() path. This debugging check should die, but I'd like to keep it for now. --- kernel/ptrace.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- PU/kernel/ptrace.c~45_STOP_WARNINGS 2009-09-17 17:54:06.0 +0200 +++

[PATCH 48] introduce ptrace_lookup_engine()

2009-09-17 Thread Oleg Nesterov
The multi-line utrace_attach_task(a lot of args) looks really annoing, add the trivial helper, ptrace_lookup_engine(tracee). --- kernel/ptrace.c | 32 +--- 1 file changed, 13 insertions(+), 19 deletions(-) --- PU/kernel/ptrace.c~48_PTRACE_LOOKUP_ENGINE 2009-09-17

Re: [PATCH 35] convert ptrace_report_syscall_entry()

2009-09-17 Thread Roland McGrath
I am worried about PTRACE_SYSEMU, I continue to ignore this magic which I don't understand yet... Hopefully I will be able to add the necessary changes later. It should not be a big complexity. The semantics is that the entry report always does like UTRACE_SYSCALL_ABORT to skip the actual

Re: [PATCH 42] do_ptrace_notify_stop: kill -ev_message != 0 check

2009-09-17 Thread Roland McGrath
do_ptrace_notify_stop() doesn't change -ptrace_message if the new value is zero. Not sure what I was thinking about when I wrote this. Perhaps you were thinking of the upstream code before tracehook.h was introduced. Ancient code left whatever was in ptrace_message before there for the 0

Re: [PATCH 38] make sure PTRACE_CONT disables SYSCALL_EXIT report

2009-09-17 Thread Roland McGrath
I am a bit surprised there is nothing in ptrace-tests to check CONT/SYSCALL behaviour. I had to write this one: That suite has grown only through regression tests for bugs that we've noticed. So it doesn't test a case if my past implementations never broke that case, nor if a regression never

Re: [PATCH 40] PTRACE_EVENT_VFORK_DONE: set ev_options = PTRACE_O_TRACEVFORKDONE

2009-09-17 Thread Roland McGrath
ptrace_report_clone() still needs more changes. I think it is simple to fix it now, but can't we simplify the utrace's behaviour first? utrace_report_clone() does not set utrace-vfork_stop without CLONE_VFORK, this adds some complications. Perhaps we can kill CLONE_VFORK check? Please