[PATCH 91] ptrace_wake_up: don't clear tracee-exit_code + update comments

2009-10-15 Thread Oleg Nesterov
ptrace_wake_up() clears tracee-exit_code, this is racy and no longer needed. This was needed previously when -exit_code was checked by callbacks. Now -exit_code is only used by do_wait(), and we have no reasons to clear it. If the tracee exits or stops again -exit_code will be correctly updated

Re: [PATCH 2/4] utrace_reap: do not play with -reporting

2009-10-15 Thread Roland McGrath
I still didn't find the time to read the code around set/clear -reporting, it is subtle and needs a fresh head. Ok. I had remembered that your earlier reviews included review all use of memory barriers in utrace, so I didn't realize this stuff needed review. But at least, I think

Re: [PATCH 83] ptrace_attach_task: suppress WARN_ON(err)

2009-10-15 Thread Roland McGrath
ptrace_attach_task: engine = utrace_attach_task(CREATE | EXCLUSIVE); err = utrace_set_events(); WARN_ON(err !tracee-exit_state); Looks correct but it is not. utrace_attach_task() can return EINPROGRESS. utrace_set_events can, yes. Note that start_callback/etc sets

Re: utrace-ptrace ptrace_check_attach()

2009-10-15 Thread Roland McGrath
And then you check whether it's really in a proper ptrace stop, see that it isn't, and use UTRACE_RESUME. So far I don't really understand to do this correctly, but OK. I guess I'm missing something because it seems trivial to me. ptrace_check_attach() does verify we are ptracer. If the

Re: [PATCH 74-78] implement the partly detached engines

2009-10-15 Thread Roland McGrath
Not sure. Suppose we call utrace_control(old, UTRACE_DETACH) right before the tracee utrace_get_signal() calls ops-report_signal(). Then utrace_control() returns -EINPROGRESS. If it returned 0, then ops-report_signal will not be called. If that's not so, utrace_control is broken.

Re: [PATCH 85] ptrace_attach_task: rely on utrace_barrier(), don't check -ops

2009-10-15 Thread Roland McGrath
Tracee, finish_callback() path: if (action == UTRACE_DETACH) engine-ops = utrace_detached_ops; utrace-reporting = NULL; no barries, no utrace-lock() in between. Tracer, utrace_barrier() under utrace-lock: if (engine-ops == utrace_detached_ops)

Re: [PATCH 90] ptrace_wake_up: add bool force_wakeup argument for implicit detach

2009-10-15 Thread Roland McGrath
ptrace_detach(sig) checks valid_signal(sig) to detect the explicit detach and passes bool voluntary to ptrace_wake_up(). ptrace_detach_task() does. ptrace_detach() has already bailed out if !valid_signal(sig) was really pass in from userland. valid_signal(0) = true, so this is

Re: [PATCH 91-94] misc attach/detach fixes

2009-10-15 Thread Roland McGrath
Roland, do you see other problems with attach/detach which should be fixed before v1? It depends what v1 means, on which I am not entirely clear. If you just mean being work-alike compatible, then the proof is in the pudding. Like I said before, if it doesn't regress any tests, including on