Page MenuHomeFreeBSD

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

Authored by trasz on Mon, Sep 28, 11:27 AM.

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
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; 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.Mon, Sep 28, 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.