Page MenuHomeFreeBSD

follow-up to r332730 and r332752: set kdb_why to "trap" for fatal traps
ClosedPublic

Authored by avg on May 14 2018, 6:18 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Nov 21, 9:16 PM
Unknown Object (File)
Mon, Nov 4, 10:46 PM
Unknown Object (File)
Mon, Nov 4, 10:38 PM
Unknown Object (File)
Oct 22 2024, 11:21 AM
Unknown Object (File)
Oct 3 2024, 11:56 AM
Unknown Object (File)
Oct 3 2024, 10:02 AM
Unknown Object (File)
Oct 1 2024, 7:39 PM
Unknown Object (File)
Sep 25 2024, 7:33 PM
Subscribers

Details

Summary

This change affects arm, arm64 and mips achitectures.
Additonally, it removes redundant checks for kdb_active where it
already results in kdb_reenter() and adds kdb_reenter() calls
where they were missing.

Some architectures check the return value of kdb_trap(), but some don't.
I haven't changed any of that.

Some trap handling routines have a return code.
I am not sure if I provided correct ones for returns after kdb_reenter().
It should not return unless kdb_jmpbufp is NULL for some reason.

Test Plan

Only compile tested for all affected architectures.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 16601
Build 16511: arc lint + arc unit

Event Timeline

Overall I think these look ok. I haven't tested them though.

sys/arm/arm/trap-v6.c
602–603

It seems like the existing kdb_reenter() logic in this file probably should be moved to abort_fatal() similar to your change for the trap-v4.c. That is probably for someone on arm@ to test and fix, but that would seem to be more consistent with how kdb_reenter() is used on other platforms.

This revision is now accepted and ready to land.May 14 2018, 8:47 PM
In D15431#325512, @jhb wrote:

Overall I think these look ok. I haven't tested them though.

sys/arm/arm/trap-v6.c
602–603

If you mean the use of kdb_reenter() in abort_handler(), then the logic mirrors the one used in i386 trap().

eadler added a subscriber: eadler.
eadler added inline comments.
sys/arm64/arm64/trap.c
159

shouldn't this be under the ifdef as well or am I mis-reading?

sys/arm64/arm64/trap.c
159

Yes, it should. Thank you.

place 'handled' under KDB, fix a whitespace issue near #ifdef

This revision now requires review to proceed.May 15 2018, 8:43 AM
sys/arm/arm/trap-v6.c
602–603

Nevermind, I had misread abort_handler() as being one of the sub-handlers in aborts[].

This revision was not accepted when it landed; it landed in state Needs Review.May 16 2018, 6:52 AM
This revision was automatically updated to reflect the committed changes.