[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250430164608.3790552-1-chen.dylane@linux.dev>
Date: Thu, 1 May 2025 00:46:06 +0800
From: Tao Chen <chen.dylane@...ux.dev>
To: ast@...nel.org,
daniel@...earbox.net,
john.fastabend@...il.com,
andrii@...nel.org,
martin.lau@...ux.dev,
eddyz87@...il.com,
song@...nel.org,
yonghong.song@...ux.dev,
kpsingh@...nel.org,
sdf@...ichev.me,
haoluo@...gle.com,
jolsa@...nel.org,
alan.maguire@...cle.com
Cc: bpf@...r.kernel.org,
linux-kernel@...r.kernel.org,
Tao Chen <chen.dylane@...ux.dev>
Subject: [RFC PATCH bpf-next 0/2] fentry supports function optimized by complier
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
Powered by blists - more mailing lists