[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210122152921.gnevsymmd4mckkee@e107158-lin>
Date: Fri, 22 Jan 2021 15:29:21 +0000
From: Qais Yousef <qais.yousef@....com>
To: Masami Hiramatsu <mhiramat@...nel.org>
Cc: Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will@...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 01/22/21 22:36, Masami Hiramatsu wrote:
> > Further analysis showed that kcb->kprobe_status is set to
> > KPROBE_REENTER when the error occurs. By teaching
> > kprobe_breakpoint_ss_handler() to handle this status I can no longer
> > reproduce the problem.
>
> Very good catch! Yes, this missed the reentered kprobe case.
>
> Acked-by: Masami Hiramatsu <mhiramat@...nel.org>
Thanks!
>
> >
> > Fixes: ba090f9cafd5 ("arm64: kprobes: Remove redundant kprobe_step_ctx")
> > Signed-off-by: Qais Yousef <qais.yousef@....com>
> > ---
> >
> > Another change in behavior I noticed is that before ba090f9cafd5 ("arm64:
> > kprobes: Remove redundant kprobe_step_ctx") if 'cur' was NULL we wouldn't
> > return DBG_HOOK_ERROR, but after the change we do.
>
> It should not happen, since the KPROBES_BRK_SS_IMM must be used only for
> kprobes's second break which must happen on the trampoline instruction
> buffer, which must set current kprobes before execution.
I see. Thanks for the explanation!
Cheers
--
Qais Yousef
Powered by blists - more mailing lists