Messages in this thread Patch in this message | | | Date | Fri, 22 Jan 2021 15:57:08 +0000 | From | Will Deacon <> | Subject | Re: [PATCH] arm64: kprobes: Fix Uexpected kernel BRK exception at EL1 |
| |
On Fri, Jan 22, 2021 at 11:09:09AM +0000, Qais Yousef wrote: > I was hitting the below panic continuously when attaching kprobes to > scheduler functions
[...]
> diff --git a/arch/arm64/kernel/probes/kprobes.c b/arch/arm64/kernel/probes/kprobes.c > index 89c64ada8732..66aac2881ba8 100644 > --- a/arch/arm64/kernel/probes/kprobes.c > +++ b/arch/arm64/kernel/probes/kprobes.c > @@ -352,8 +352,8 @@ kprobe_breakpoint_ss_handler(struct pt_regs *regs, unsigned int esr) > unsigned long addr = instruction_pointer(regs); > struct kprobe *cur = kprobe_running(); > > - if (cur && (kcb->kprobe_status == KPROBE_HIT_SS) > - && ((unsigned long)&cur->ainsn.api.insn[1] == addr)) { > + if (cur && (kcb->kprobe_status & (KPROBE_HIT_SS | KPROBE_REENTER)) && > + ((unsigned long)&cur->ainsn.api.insn[1] == addr)) { > kprobes_restore_local_irqflag(kcb, regs); > post_kprobe_handler(cur, kcb, regs);
Acked-by: Will Deacon <will@kernel.org>
Catalin can pick this up for 5.11.
Will
| |