Page MenuHomeFreeBSD

ktrace: Fix some problems with process subtree traversal
Needs ReviewPublic

Authored by markj on May 27 2021, 7:29 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Aug 18, 10:51 AM
Unknown Object (File)
Thu, Aug 13, 4:49 AM
Unknown Object (File)
Wed, Aug 12, 3:11 PM
Unknown Object (File)
Wed, Aug 12, 9:23 AM
Unknown Object (File)
Sat, Aug 8, 4:01 PM
Unknown Object (File)
Thu, Aug 6, 11:04 AM
Unknown Object (File)
Thu, Aug 6, 2:10 AM
Unknown Object (File)
Mon, Aug 3, 8:38 AM
Subscribers

Details

Reviewers
kib
Summary


- Avoid visiting processes that were reparented, since they represent
debuggees possibly belonging to a different subtree.
- Visit orphan processes, to ensure that reparented debuggees that do
belong to the subtree are treated consistently.

Reported by: kib

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 39520
Build 36409: arc lint + arc unit

Event Timeline

markj requested review of this revision.May 27 2021, 7:29 PM
sys/kern/kern_ktrace.c
1244

I understand why this assert should be true for 'p' equal to the function argument. But after we started iterating over siblings, I think this is no longer true, generally.

1268

For orphans, I believe the iteration should be also done in depth, same as for siblings. Children of an orphan are also descendants of the process.