From 9d0a6b83ca8917392b7a2a90446b4c86a9995d38 Mon Sep 17 00:00:00 2001 From: Andrew Turner Date: Wed, 23 Oct 2019 13:21:15 +0000 Subject: [PATCH] Stop enabling interrupts when reentering kdb on arm64 When we raise a data abort from the kernel we need to enable interrupts, however we shouldn't be doing this when in the kernel debugger. In this case interrupts can lead to a further panic as they don't expect to be run from such a context. MFC after: 2 weeks Sponsored by: DARPA, AFRL --- sys/arm64/arm64/trap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/arm64/arm64/trap.c b/sys/arm64/arm64/trap.c index 9e57dbc1f683..ce6dd265543c 100644 --- a/sys/arm64/arm64/trap.c +++ b/sys/arm64/arm64/trap.c @@ -179,6 +179,8 @@ data_abort(struct thread *td, struct trapframe *frame, uint64_t esr, if (lower) map = &p->p_vmspace->vm_map; else { + intr_enable(); + /* The top bit tells us which range to use */ if (far >= VM_MAXUSER_ADDRESS) { map = kernel_map; @@ -316,7 +318,6 @@ do_el1h_sync(struct thread *td, struct trapframe *frame) case EXCP_INSN_ABORT: case EXCP_DATA_ABORT: far = READ_SPECIALREG(far_el1); - intr_enable(); data_abort(td, frame, esr, far, 0, exception == EXCP_INSN_ABORT); break;