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)
Thu, Apr 18, 1:03 PM
Unknown Object (File)
Tue, Apr 16, 9:04 AM
Unknown Object (File)
Sun, Apr 7, 5:07 AM
Unknown Object (File)
Wed, Mar 27, 7:18 PM
Unknown Object (File)
Jan 10 2024, 2:48 AM
Unknown Object (File)
Dec 23 2023, 3:34 AM
Unknown Object (File)
Dec 12 2023, 3:34 PM
Unknown Object (File)
Dec 2 2023, 6:23 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.