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)
May 22 2024, 10:30 PM
Unknown Object (File)
May 22 2024, 6:34 PM
Unknown Object (File)
May 14 2024, 10:16 AM
Unknown Object (File)
Jan 2 2024, 11:40 AM
Unknown Object (File)
Dec 23 2023, 4:58 AM
Unknown Object (File)
Oct 15 2023, 9:44 AM
Unknown Object (File)
Jul 28 2023, 6:53 PM
Unknown Object (File)
Jun 10 2023, 5:41 PM
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.