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)
Sep 30 2024, 5:47 AM
Unknown Object (File)
Sep 21 2024, 8:09 AM
Unknown Object (File)
Sep 17 2024, 4:00 PM
Unknown Object (File)
Sep 17 2024, 12:53 PM
Unknown Object (File)
Sep 16 2024, 4:06 AM
Unknown Object (File)
Sep 10 2024, 4:38 PM
Unknown Object (File)
Sep 10 2024, 2:36 AM
Unknown Object (File)
Aug 28 2024, 6:48 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.