Page MenuHomeFreeBSD

arm64: Raise a SIGBUS on a user external abort
ClosedPublic

Authored by andrew on Sep 29 2023, 1:59 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Oct 8, 3:42 AM
Unknown Object (File)
Tue, Oct 7, 5:05 PM
Unknown Object (File)
Sun, Oct 5, 7:34 AM
Unknown Object (File)
Fri, Sep 26, 11:02 AM
Unknown Object (File)
Tue, Sep 23, 10:40 PM
Unknown Object (File)
Sep 10 2025, 11:36 PM
Unknown Object (File)
Aug 8 2025, 11:01 AM
Unknown Object (File)
Aug 2 2025, 7:17 PM
Subscribers

Details

Summary

When userspace triggers an external abort allow it to handle the abort
by raising a SIGBUS.

Sponsored by: Arm Ltd

Diff Detail

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

Event Timeline

sys/arm64/arm64/trap.c
230

Does this mean that userspace can't reliably distinguish between a SIGBUS due to a vm_fault() failure and a SIGBUS due to an external abort?

239

No need to test !lower now.

246

Same here.

Remove unneeded lower checks

sys/arm64/arm64/trap.c
230

The app gets the fault address from FAR, which should be enough for it to understand the specific mapping that caused the trap.

In other words, I think that there is no need for additional arch-specific BUS_XXX code for this situation.

This revision is now accepted and ready to land.Oct 11 2023, 5:38 PM