Page MenuHomeFreeBSD

arm64: clear debug register state on fork
ClosedPublic

Authored by mhorne on Apr 7 2021, 7:34 PM.
Tags
None
Referenced Files
F170614585: D29630.id.diff
Sat, Sep 5, 3:51 PM
F170592010: D29630.id86973.diff
Sat, Sep 5, 1:31 PM
F170575430: D29630.id87033.diff
Sat, Sep 5, 11:43 AM
F170562768: D29630.id86973.diff
Sat, Sep 5, 10:29 AM
Unknown Object (File)
Sat, Sep 5, 5:07 AM
Unknown Object (File)
Fri, Sep 4, 7:42 PM
Unknown Object (File)
Fri, Sep 4, 5:23 AM
Unknown Object (File)
Wed, Sep 2, 10:12 PM

Details

Summary

Following the analogous change for amd64 and i386 in 8223717ce62c,
ensure that new processes start with these registers inactive.

Reported by: Michał Górny

Test Plan

Check the result of PT_GETDBREGS on a grandchild process before and after this change.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

mhorne requested review of this revision.Apr 7 2021, 7:34 PM
This revision is now accepted and ready to land.Apr 7 2021, 9:13 PM
This revision was automatically updated to reflect the committed changes.

Should they also be cleared in exec_setregs()? Or do we expect to keep them if they are changed after fork()?

Should they also be cleared in exec_setregs()? Or do we expect to keep them if they are changed after fork()?

Yes, we should clear them to be safe, since some settings will not apply to the new executable. I missed your recently added TODO comment there.

I'll post a new review shortly.