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)
Sat, Apr 27, 8:57 AM
Unknown Object (File)
Sat, Apr 27, 5:54 AM
Unknown Object (File)
Tue, Apr 23, 5:49 AM
Unknown Object (File)
Dec 20 2023, 4:31 AM
Unknown Object (File)
Dec 12 2023, 9:42 AM
Unknown Object (File)
Sep 5 2023, 11:52 PM
Unknown Object (File)
Aug 14 2023, 11:06 PM
Unknown Object (File)
Aug 14 2023, 12:53 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.