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)
Sun, Nov 24, 6:16 AM
Unknown Object (File)
Thu, Nov 21, 12:51 AM
Unknown Object (File)
Wed, Nov 20, 5:19 AM
Unknown Object (File)
Fri, Nov 15, 9:58 AM
Unknown Object (File)
Thu, Nov 14, 6:35 AM
Unknown Object (File)
Mon, Nov 11, 2:50 PM
Unknown Object (File)
Mon, Nov 11, 2:11 PM
Unknown Object (File)
Mon, Nov 11, 12:42 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.