Page MenuHomeFreeBSD

Don't clear p_ptevents on normal SIGKILL delivery
ClosedPublic

Authored by badger on Mar 10 2017, 3:37 AM.
Tags
None
Referenced Files
F81636284: D9939.diff
Fri, Apr 19, 7:29 AM
Unknown Object (File)
Thu, Apr 4, 5:11 PM
Unknown Object (File)
Mar 20 2024, 9:18 AM
Unknown Object (File)
Jan 12 2024, 11:43 AM
Unknown Object (File)
Dec 24 2023, 3:25 AM
Unknown Object (File)
Dec 21 2023, 2:25 AM
Unknown Object (File)
Dec 20 2023, 12:21 AM
Unknown Object (File)
Dec 8 2023, 9:46 PM
Subscribers

Details

Summary

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

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 7992
Build 8156: arc lint + arc unit

Event Timeline

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

sys/kern/kern_sig.c
2183

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.

sys/kern/kern_sig.c
2183

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.