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, Sep 17, 5:28 AM
Unknown Object (File)
Wed, Sep 11, 7:57 AM
Unknown Object (File)
Mon, Sep 9, 9:41 AM
Unknown Object (File)
Sat, Sep 7, 2:24 PM
Unknown Object (File)
Thu, Sep 5, 4:20 PM
Unknown Object (File)
Jul 20 2024, 1:42 PM
Unknown Object (File)
Jul 1 2024, 3:02 AM
Unknown Object (File)
May 23 2024, 4:12 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 Skipped
Unit
Tests Skipped
Build Status
Buildable 50232
Build 47124: arc lint + arc unit

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.