Thread (17 messages) 17 messages, 7 authors, 2020-01-22

RE: [PATCH v2 bpf-next 2/3] libbpf: Add support for program extensions

From: John Fastabend <john.fastabend@gmail.com>
Date: 2020-01-21 18:38:45
Also in: bpf

Alexei Starovoitov wrote:
Add minimal support for program extensions. bpf_object_open_opts() needs to be
called with attach_prog_fd = target_prog_fd and BPF program extension needs to
have in .c file section definition like SEC("freplace/func_to_be_replaced").
libbpf will search for "func_to_be_replaced" in the target_prog_fd's BTF and
will pass it in attach_btf_id to the kernel. This approach works for tests, but
more compex use case may need to request function name (and attach_btf_id that
kernel sees) to be more dynamic. Such API will be added in future patches.

Signed-off-by: Alexei Starovoitov <ast@kernel.org>
---
Acked-by: John Fastabend <john.fastabend@gmail.com>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help