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
F133122461: D30513.id90025.diff
Thu, Oct 23, 4:05 AM
Unknown Object (File)
Mon, Oct 20, 5:21 PM
Unknown Object (File)
Mon, Oct 20, 5:21 PM
Unknown Object (File)
Mon, Oct 20, 3:37 AM
Unknown Object (File)
Sat, Oct 18, 9:00 PM
Unknown Object (File)
Thu, Oct 9, 6:01 AM
Unknown Object (File)
Sat, Oct 4, 2:45 PM
Unknown Object (File)
Thu, Sep 25, 11:50 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.