Page MenuHomeFreeBSD

Do not execute exception handlers with disabled interrupts
ClosedPublic

Authored by kib on Sep 14 2015, 10:30 PM.
Tags
Referenced Files
Unknown Object (File)
Jan 8 2024, 7:42 PM
Unknown Object (File)
Dec 22 2023, 5:33 AM
Unknown Object (File)
Dec 20 2023, 1:36 AM
Unknown Object (File)
Nov 19 2023, 1:41 AM
Unknown Object (File)
Nov 13 2023, 11:25 AM
Unknown Object (File)
Oct 25 2023, 5:47 AM
Unknown Object (File)
Sep 7 2023, 11:50 PM
Unknown Object (File)
Jun 11 2023, 2:23 PM
Subscribers

Details

Summary

We should not call vm_fault(), or send a signal, with interrupts disabled. MI kernel code is not prepared for such environment, not to mention that this increases the system latency, since code appears to be executing as being under spinlock.

The FAR register for data aborts is read before the interrupts are enabled, to avoid its corruption due to nested exception or context switch.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kib retitled this revision from to Do not execute exception handlers with disabled interrupts.
kib updated this object.
kib edited the test plan for this revision. (Show Details)
kib added a reviewer: andrew.
kib set the repository for this revision to rS FreeBSD src repository - subversion.
kib added a project: arm64.
andrew edited edge metadata.
andrew added inline comments.
sys/arm64/arm64/trap.c
79 ↗(On Diff #8762)

We should probably move print_registers to the top of the file.

This revision is now accepted and ready to land.Sep 18 2015, 1:22 PM

WRT print_registers, I would like to eventually add analog of x86 machdep.uprintf_signal and enhance the panic with more MD data. I do not see much sense in increasing churn right now, most of other kernel code authors do not bother with reordering functions in file to ensure local visibility without forward declaration.

This revision was automatically updated to reflect the committed changes.