Page MenuHomeFreeBSD

arm64: clear debug register state on fork
ClosedPublic

Authored by mhorne on Apr 7 2021, 7:34 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Mar 29, 11:58 AM
Unknown Object (File)
Sat, Mar 28, 4:36 PM
Unknown Object (File)
Sat, Mar 28, 11:25 AM
Unknown Object (File)
Thu, Mar 19, 7:10 AM
Unknown Object (File)
Wed, Mar 18, 6:29 AM
Unknown Object (File)
Sun, Mar 8, 11:26 AM
Unknown Object (File)
Sun, Mar 8, 12:08 AM
Unknown Object (File)
Thu, Mar 5, 3:28 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
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 38385
Build 35274: arc lint + arc unit

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.