[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210122155708.GA25088@willie-the-truck>
Date: Fri, 22 Jan 2021 15:57:08 +0000
From: Will Deacon <will@...nel.org>
To: Qais Yousef <qais.yousef@....com>
Cc: Catalin Marinas <catalin.marinas@....com>,
Masami Hiramatsu <mhiramat@...nel.org>,
Jean-Philippe Brucker <jean-philippe@...aro.org>,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
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@...nel.org>
Catalin can pick this up for 5.11.
Will
Powered by blists - more mailing lists