I've merged these (up to 5/6 so far).  

Now I'm looking at all the uses of ->stopped.

* utrace_set_events
  could test task_is_stopped_or_traced() || ->exit_state

* utrace_control: 
  could test task_is_traced() ||
             ->exit_state && !(->utrace_flags & _UTRACE_DEATH_EVENTS)
  (or let utrace_do_stop test the latter)

* finish_utrace_stop
  detects signal_wake_up(,1) (SIGKILL)

(And the rest are just the bookkeeping to keep it set/cleared.)

So I think it's now true that the only thing ->stopped is buying us is that
finish_utrace_stop test.  Do you agree?

Perhaps we can just replace that with __fatal_signal_pending (or inline it,
that should be a one-insn test), or with a check on SIGNAL_GROUP_KILLED or
suchlike if we had that.  (Some test for group-exit-or-exec.)

If we can indeed clean up each of those uses with a different test that is
sufficient for the case, then we can drop the utrace->stopped bit entirely.
That means we actually wouldn't need tracehook_finish_jctl for anything,
AFAICT.


Thanks,
Roland

Reply via email to