> Nothing wrong (I think), but this is more complex and implies more
> unnecessary work.

You mean the code path taken is longer.  But the code's logic remains simple.

> If ptrace_report_signal() sends the trap, we actually send the signal
> twice. Firstly ptrace_resume() does utrace_control(UTRACE_INTERRUPT)
> (ok, this is not the signal sending but sort of), then ->report_signal()
> notices we need the trap and send the "real" signal, then we return
> to get_signal_to_deliver() which calls utrace_get_signal() again, it
> dequeues SIGTRAP and calls ptrace_report_signal() again to finally
> report SIGTRAP to the tracer.

I don't think this extra step is particuarly costly given the context.

> But: I am not sure yet, but I think the current code is not optimal for
> that, it was written to report *info without force_sig_info(). 

I don't really follow that bit.  
But I'll just see what new code you come up with.

> So, lets revert this change for now to be compatible. This change
> is simple and can be done again at any time, probably along with
> upstream change.

Ok.


Thanks,
Roland

Reply via email to