Thread (15 messages) 15 messages, 4 authors, 1d ago

Re: [RFC v3 2/2] arm64: kprobes: Allow reentering kprobes while single-stepping

From: Will Deacon <will@kernel.org>
Date: 2026-07-17 18:02:29
Also in: linux-arm-kernel, lkml

On Fri, Jul 17, 2026 at 11:31:31AM +0000, Hongyan Xia wrote:
On 7/17/2026 7:01 PM, Will Deacon wrote:
quoted
Thanks. So perf is run synchronously from the debug exception entry path,
Yes, exactly.
quoted
rather than because of a second exception taking place. Got it. But then
it sounds like we should really make the debug exception handling path (at
least, the part that runs for handling the kprobe step) noinstr to avoid
getting into this state to begin with. Is that practical?
Not sure about making the whole path noinstr (@Masami might have a 
better opinion on this than me). Personally I don't mind either 
disallowing it or making it correct.

But it might be a good idea not to diverge too much between ISAs. This 
patch is pretty much mirroring what the x86 side handles this situation.
Ok, so how about this. I'll take these fixes for now, but let's try to
make these paths noinstr in the future? That's a much bigger job, but I
do worry that we're going to otherwise end up adding special logic every
time we run into an unexpected re-entrant case.

Will
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help