BPF List
 help / color / mirror / Atom feed
From: liujing40 <liujing.root@gmail.com>
To: ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org,
	mhiramat@kernel.org, martin.lau@linux.dev, eddyz87@gmail.com,
	song@kernel.org, yonghong.song@linux.dev,
	john.fastabend@gmail.com, kpsingh@kernel.org, sdf@fomichev.me,
	haoluo@google.com, jolsa@kernel.org
Cc: bpf@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-trace-kernel@vger.kernel.org, liujing40@xiaomi.com
Subject: [PATCH 0/2] bpf: Add kretprobe fallback for kprobe multi link
Date: Thu, 18 Dec 2025 21:06:27 +0800	[thread overview]
Message-ID: <20251218130629.365398-1-liujing40@xiaomi.com> (raw)

This patch provides a fallback implementation of kprobe multi link
using the traditional kretprobe API When fprobe is not available.
This ensures compatibility with older kernels or platforms where
fprobe support is not compiled in.

Uses kretprobe's entry_handler and handler callbacks to simulate
fprobe's entry/exit functionality.The API remains identical to
fprobe-based implementation, allowing userspace tools to work
transparently with either backend. Cookie support, both entry
and return probes, and session handling are fully supported.

Jing Liu (2):
  bpf: Prepare for kprobe multi link fallback patch
  bpf: Implement kretprobe fallback for kprobe multi link

 kernel/trace/bpf_trace.c | 603 ++++++++++++++++++++++++++++-----------
 1 file changed, 443 insertions(+), 160 deletions(-)

-- 
2.25.1


             reply	other threads:[~2025-12-18 13:07 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-18 13:06 liujing40 [this message]
2025-12-18 13:06 ` [PATCH 1/2] bpf: Prepare for kprobe multi link fallback patch liujing40
2025-12-18 13:06 ` [PATCH 2/2] bpf: Implement kretprobe fallback for kprobe multi link liujing40
2025-12-18 13:33   ` bot+bpf-ci
2026-01-29  0:13     ` Masami Hiramatsu
2025-12-18 17:53   ` Alexei Starovoitov
2025-12-18 21:09     ` Steven Rostedt
2025-12-22  8:00       ` liujing40
2025-12-19  1:57   ` Menglong Dong
2025-12-22  8:02     ` liujing40
2025-12-22 17:15       ` Steven Rostedt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251218130629.365398-1-liujing40@xiaomi.com \
    --to=liujing.root@gmail.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=eddyz87@gmail.com \
    --cc=haoluo@google.com \
    --cc=john.fastabend@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=kpsingh@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=liujing40@xiaomi.com \
    --cc=martin.lau@linux.dev \
    --cc=mhiramat@kernel.org \
    --cc=sdf@fomichev.me \
    --cc=song@kernel.org \
    --cc=yonghong.song@linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox