RFC fentry supports function optimized by complier
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest2 patches 4 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | libbpf: Try get fentry func addr from available_filter_functions_addrtools/ tools/ tools/ +2 more | +57 | 0 replies | |
| 2/2 | bpf: Get fentry func addr from user when BTF info invalidinclude/ include/ kernel/ +1 more | +12 | 3 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [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/[email protected]/
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(+)
Signature · 1 line
2.43.0