[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250919175255.f7c2c77fa03665a42b148046@kernel.org>
Date: Fri, 19 Sep 2025 17:52:55 +0900
From: Masami Hiramatsu (Google) <mhiramat@...nel.org>
To: Menglong Dong <menglong8.dong@...il.com>
Cc: peterz@...radead.org, jolsa@...nel.org, tglx@...utronix.de,
mingo@...hat.com, bp@...en8.de, dave.hansen@...ux.intel.com,
x86@...nel.org, hpa@...or.com, kees@...nel.org, samitolvanen@...gle.com,
rppt@...nel.org, luto@...nel.org, mhiramat@...nel.org, ast@...nel.org,
andrii@...nel.org, linux-kernel@...r.kernel.org, bpf@...r.kernel.org
Subject: Re: [PATCH] x86/ibt: make is_endbr() notrace
On Thu, 18 Sep 2025 20:09:39 +0800
Menglong Dong <menglong8.dong@...il.com> 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@...nel.org>
Powered by blists - more mailing lists