From: Tao Chen <chen.dylane@linux.dev>
To: ast@kernel.org, daniel@iogearbox.net, john.fastabend@gmail.com,
andrii@kernel.org, martin.lau@linux.dev, eddyz87@gmail.com,
song@kernel.org, yonghong.song@linux.dev, kpsingh@kernel.org,
sdf@fomichev.me, haoluo@google.com, jolsa@kernel.org,
alan.maguire@oracle.com
Cc: bpf@vger.kernel.org, linux-kernel@vger.kernel.org,
Tao Chen <chen.dylane@linux.dev>
Subject: [RFC PATCH bpf-next 0/2] fentry supports function optimized by complier
Date: Thu, 1 May 2025 00:46:06 +0800 [thread overview]
Message-ID: <20250430164608.3790552-1-chen.dylane@linux.dev> (raw)
The previous discussion about fentry invalid on function optimeized by complier
is as follows:
https://lore.kernel.org/bpf/3c6f539b-b498-4587-b0dc-5fdeba717600@oracle.com/
This seems to be something that pahole needs to resolve. However, Alan
mentioned that there are many situations involved in this, and he proposed
that the available_filter_functions_addr can be used to find the address of
the real function. If we can get the real address from user, maybe this address
can be used when the function obtained from the BTF is invalid.
The specific selftest has not been added yet. I just wrote a simple test
program and ran it.
This is the initial RFC patch, feedback is welcome.
Tao Chen (2):
libbpf: Try get fentry func addr from available_filter_functions_addr
bpf: Get fentry func addr from user when BTF info invalid
include/linux/bpf.h | 1 +
include/uapi/linux/bpf.h | 1 +
kernel/bpf/syscall.c | 1 +
kernel/bpf/verifier.c | 9 ++++++
tools/include/uapi/linux/bpf.h | 1 +
tools/lib/bpf/bpf.c | 1 +
tools/lib/bpf/bpf.h | 1 +
tools/lib/bpf/gen_loader.c | 1 +
tools/lib/bpf/libbpf.c | 53 ++++++++++++++++++++++++++++++++++
9 files changed, 69 insertions(+)
--
2.43.0
next reply other threads:[~2025-04-30 16:47 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-30 16:46 Tao Chen [this message]
2025-04-30 16:46 ` [RFC PATCH bpf-next 1/2] libbpf: Try get fentry func addr from available_filter_functions_addr Tao Chen
2025-04-30 16:46 ` [RFC PATCH bpf-next 2/2] bpf: Get fentry func addr from user when BTF info invalid Tao Chen
2025-04-30 17:57 ` Alan Maguire
2025-04-30 22:23 ` Alexei Starovoitov
2025-05-06 3:17 ` Tao Chen
2025-04-30 17:58 ` [RFC PATCH bpf-next 0/2] fentry supports function optimized by complier Alan Maguire
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=20250430164608.3790552-1-chen.dylane@linux.dev \
--to=chen.dylane@linux.dev \
--cc=alan.maguire@oracle.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=martin.lau@linux.dev \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.