Page MenuHomeFreeBSD

sys/arm: Fix DTrace trap hook
Needs ReviewPublic

Authored by freebsd_dev.thsi.be on Sun, Aug 30, 10:51 PM.
Tags
None
Referenced Files
F169791606: D59279.id.diff
Wed, Sep 2, 2:13 PM
F169784204: D59279.id.diff
Wed, Sep 2, 1:38 PM
F169775548: D59279.diff
Wed, Sep 2, 1:03 PM
F169759193: D59279.id185459.diff
Wed, Sep 2, 11:42 AM
Unknown Object (File)
Tue, Sep 1, 5:24 PM
Unknown Object (File)
Tue, Sep 1, 5:22 PM
Unknown Object (File)
Tue, Sep 1, 4:53 PM
Unknown Object (File)
Tue, Sep 1, 4:47 PM
Subscribers

Details

Summary

Move the dtrace_trap hook at the start of the abort handler to exit
early when a trap is handled by DTrace.

Fix the type argument to be the actual fault type instead of the value
of the FAR. The latter will need to be added to the trapframe, until
then DTrace will report unmapped addresses as the null address.

Correct the comment of the PUSHFRAMEINSVC assembler macro to reflect
that coming from SVC32 mode is expected for DTrace traps.

PR: 298064
MFC after: 1 month

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 76338
Build 73221: arc lint + arc unit

Event Timeline

Also catch FAULT_TRAN_L1.
[edit: comment meant for D59281]

Looks good to me, just a small comment.

sys/arm/arm/trap-v6.c
338

I would move the block here, after the FAULT_DEBUG and FAULT_EA_IMPREC checks: dtrace shouldn't be intercepting those in any case. It seems clearer to group the hook with the subsequent pmap_fault() call.