Re: Q: utrace-stopped utrace_report_jctl()

2009-03-16 Thread Oleg Nesterov
On 03/15, Roland McGrath wrote: Then we re-do this (well, almost) check under -siglock, } else if (task_is_stopped(target)) { if (!(target-utrace_flags UTRACE_EVENT(JCTL))) utrace-stopped = stopped = true; } But this is not nice. Let's

Re: Q: utrace-stopped utrace_report_jctl()

2009-03-15 Thread Roland McGrath
I was wrong, I forgot that tracehook_get_signal() doesn't need JCTL. Right, that is key. OK, let's look at utrace_do_stop: if (task_is_stopped(target) !(target-utrace_flags UTRACE_EVENT(JCTL))) { utrace-stopped = 1; return true; }

Re: Q: utrace-stopped utrace_report_jctl()

2009-03-13 Thread Oleg Nesterov
On 03/12, Roland McGrath wrote: Yep. And utrace_reset() can be called because -stopped == 1. Right. Let me explain. Again, let's suppose D attaches engine E to the target T. T enters utrace_report_jctl() with -stopped == 1. D calls utrace_set_events(events = 0), this removes JCTL

Re: Q: utrace-stopped utrace_report_jctl()

2009-03-12 Thread Roland McGrath
I'd like to ask you to clarify what utrace-stopped means... I'm very glad you are looking into this area! My understanding is: if we see -stopped == true under utrace-lock, then the target can do nothing interesting from the utrace's pov. The target should take utrace-lock at least once.

Re: Q: utrace-stopped utrace_report_jctl()

2009-03-12 Thread Oleg Nesterov
Roland, I left some parts of your message unanswered because I need to think more about them... On 03/12, Roland McGrath wrote: But, if we enter utrace_report_jctl() with -stopped == 1, JCTL can be already removed from -utrace_flags, exactly because -stopped was true. I don't follow this.

Re: Q: utrace-stopped utrace_report_jctl()

2009-03-12 Thread Roland McGrath
Yep. And utrace_reset() can be called because -stopped == 1. Right. Let me explain. Again, let's suppose D attaches engine E to the target T. T enters utrace_report_jctl() with -stopped == 1. D calls utrace_set_events(events = 0), this removes JCTL from E-flags. D calls, say,