Re: [PATCH] x86/ibt: make is_endbr() notrace
From: Google
Date: Fri Sep 19 2025 - 04:53:01 EST
On Thu, 18 Sep 2025 20:09:39 +0800
Menglong Dong <menglong8.dong@xxxxxxxxx> wrote:
> is_endbr() is called in __ftrace_return_to_handler -> fprobe_return ->
> kprobe_multi_link_exit_handler -> is_endbr.
>
> It is not protected by the "bpf_prog_active", so it can't be traced by
> kprobe-multi, which can cause recurring and panic the kernel. Fix it by
> make it notrace.
Ah, OK. This is fprobe's issue. fprobe depends on fgraph to check
recursion, but fgraph only detects the recursion in the entry handler.
Thus it happens in the exit handler, fprobe does not check the recursion.
But since the fprobe provides users to register callback at exit, it
should check the recursion in return path too.
Thanks,
--
Masami Hiramatsu (Google) <mhiramat@xxxxxxxxxx>