Page MenuHomeFreeBSD

Don't clear p_ptevents on normal SIGKILL delivery

Authored by badger on Mar 10 2017, 3:37 AM.



The ptrace() user has the option of discarding the signal. In such a
case, p_ptevents should not be modified. If the ptrace() user decides to
send a SIGKILL, ptevents will be cleared in ptracestop(). procfs events
do not have the capability to discard the signal, so continue to clear
the mask in that case.

Originally brought up in D9260.

Test Plan

It can be verified by configuring gdb to not pass SIGKILL that, without
this patch, sending a SIGKILL will result in lost LWP events. All
ptrace kyua tests still pass.

Diff Detail

rS FreeBSD src repository - subversion
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

It would be nice to add a new test case for this if it isn't too much trouble.

2183 ↗(On Diff #26108)

I would maybe keep the SIGKILL: prefix

This revision is now accepted and ready to land.Mar 10 2017, 6:19 PM
In D9939#205622, @jhb wrote:

It would be nice to add a new test case for this if it isn't too much trouble.

I could do that.

2183 ↗(On Diff #26108)

I thought it was perhaps approaching the banal threshold due to its proximity to the sig == SIGKILL test, but it doesn't bother me to put it back.

badger edited edge metadata.
  • Add kyua test
  • restore SIGKILL: in comment
This revision now requires review to proceed.Mar 11 2017, 4:15 PM
This revision was automatically updated to reflect the committed changes.