Re: [PATCH v2] riscv: kprobes: Prevent probes in breakpoint handlers

Paul Walmsley <[email protected]>
Newsgroups org.infradead.lists.linux-riscv,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
On Thu, 6 Aug 2026, Rui Qi wrote:

> The ftrace selftest multiple_kprobes.tc registers kprobe events on
> the first 256 text symbols from /proc/kallsyms. If handle_break() is
> selected as a probe target on RISC-V, the breakpoint exception path
> can trap again before it reaches the kprobe breakpoint handler. That
> recursively enters do_trap_break() and can make the system
> unresponsive.
> 
> Mark handle_break() and its local probe dispatch helpers as nokprobe
> symbols so they are added to the kprobe blacklist, matching other
> low-level breakpoint exception paths.
> 
> Signed-off-by: Rui Qi <[email protected]>
> Reviewed-by: Nam Cao <[email protected]>

Thanks, queued for v7.3.


- Paul

_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.