Page MenuHomeFreeBSD

arm64: add fault address to trapframe
ClosedPublic

Authored by zachary.leaf_arm.com on Mar 8 2023, 2:53 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Nov 12, 6:37 AM
Unknown Object (File)
Tue, Nov 5, 12:07 PM
Unknown Object (File)
Tue, Oct 29, 5:05 AM
Unknown Object (File)
Wed, Oct 16, 12:59 PM
Unknown Object (File)
Wed, Oct 16, 11:57 AM
Unknown Object (File)
Wed, Oct 16, 11:55 AM
Unknown Object (File)
Oct 14 2024, 12:37 PM
Unknown Object (File)
Oct 2 2024, 6:38 PM

Details

Summary

It was previously possible for the fault address register to get
clobbered before it was saved. This small window occurred when an
additional exception was encountered inside the exception handler,
overwriting the previous value.

Commit f29942229d24 ("Read the arm64 far early in el0 exceptions")
patched this issue, but avoided changing the trapframe since this could
be considered a KBI change in FreeBSD 13.

Revert the above fix and save the fault address in the trapframe
instead. This saves the fault address even earlier in the exception
handling process, and is a more robust and simple fix.

Sponsored by: Arm Ltd

Diff Detail

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

Event Timeline

jrtc27 added a subscriber: jrtc27.

Would be helpful to print this in ddb backtraces as a follow-up now it's reliably available for exception trapframes

This revision is now accepted and ready to land.Mar 8 2023, 4:14 PM

Please do all the trapframe layout changes as a single series with a single version bump.

This revision was automatically updated to reflect the committed changes.