Page MenuHomeFreeBSD

Use the 'traced' variable instead of comparing p->p_flag again
ClosedPublic

Authored by trasz on Sep 28 2020, 11:27 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Dec 21, 1:19 PM
Unknown Object (File)
Mon, Dec 16, 3:25 PM
Unknown Object (File)
Sat, Dec 14, 3:38 PM
Unknown Object (File)
Nov 15 2024, 6:25 AM
Unknown Object (File)
Nov 14 2024, 10:36 AM
Unknown Object (File)
Nov 1 2024, 7:10 PM
Unknown Object (File)
Oct 1 2024, 4:43 PM
Unknown Object (File)
Sep 30 2024, 12:04 PM
Subscribers

Details

Summary

Use the 'traced' variable instead of comparing p->p_flag again.
There's no call to ptracestop() before that, so the 'traced'
variable is still up to date.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

I believe the idea of recheck is because potentially there is a large time gap between first and second use of the flag. For instance, we fetch syscall args in between, which might access user memory, which might fault and cause page in.

Also I do not see how absence of ptracestop() before second use changes anything.

This revision is now accepted and ready to land.Sep 28 2020, 12:24 PM

Yeah, my point about ptracestop would apply more to eg registers being updated by the debugger, not to the fact of being debugged or not.