Page MenuHomeFreeBSD

D3246.id7496.diff
No OneTemporary

D3246.id7496.diff

Index: sys/arm64/arm64/trap.c
===================================================================
--- sys/arm64/arm64/trap.c
+++ sys/arm64/arm64/trap.c
@@ -296,6 +296,7 @@
{
uint32_t exception;
uint64_t esr;
+ register_t reg;
/* Check we have a sane environment when entering from userland */
KASSERT((uintptr_t)get_pcpu() >= VM_MIN_KERNEL_ADDRESS,
@@ -319,7 +320,19 @@
#endif
break;
case EXCP_SVC:
+ /*
+ * Ensure the svc_handler is being run with interrupts enabled.
+ * Do the following:
+ * 1. Get current interrupt register state and disable
+ * interrupts (put the system in a consistent state)
+ * 2. Unconditionally enable interrupts.
+ * 3. Run svc_handler
+ * 4. Restore previous value of system interrupt register
+ */
+ reg = intr_disable();
+ intr_enable();
svc_handler(frame);
+ intr_restore(reg);
break;
case EXCP_INSN_ABORT_L:
case EXCP_DATA_ABORT_L:

File Metadata

Mime Type
text/plain
Expires
Mon, Apr 27, 4:37 AM (18 h, 51 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
32208037
Default Alt Text
D3246.id7496.diff (917 B)

Event Timeline