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)
Feb 19 2024, 5:03 PM
Unknown Object (File)
Feb 10 2024, 3:55 PM
Unknown Object (File)
Dec 28 2023, 9:56 PM
Unknown Object (File)
Dec 20 2023, 2:23 AM
Unknown Object (File)
Nov 24 2023, 9:01 PM
Unknown Object (File)
Nov 19 2023, 1:32 AM
Unknown Object (File)
Nov 19 2023, 1:32 AM
Unknown Object (File)
Nov 19 2023, 1:32 AM
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.