Re: [PATCH bpf-next 5/7] tools/libbpf: Add support for BPF_MODIFY_RETURN

From: Andrii Nakryiko
Date: Tue Mar 03 2020 - 17:45:26 EST


On Tue, Mar 3, 2020 at 6:12 AM KP Singh <kpsingh@xxxxxxxxxxxx> wrote:
>
> From: KP Singh <kpsingh@xxxxxxxxxx>
>
> Signed-off-by: KP Singh <kpsingh@xxxxxxxxxx>
> ---

Acked-by: Andrii Nakryiko <andriin@xxxxxx>

> tools/lib/bpf/libbpf.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c
> index f8c4042e5855..223be01dc466 100644
> --- a/tools/lib/bpf/libbpf.c
> +++ b/tools/lib/bpf/libbpf.c
> @@ -6288,6 +6288,10 @@ static const struct bpf_sec_def section_defs[] = {
> .expected_attach_type = BPF_TRACE_FENTRY,
> .is_attach_btf = true,
> .attach_fn = attach_trace),
> + SEC_DEF("fmod_ret/", TRACING,
> + .expected_attach_type = BPF_MODIFY_RETURN,
> + .is_attach_btf = true,
> + .attach_fn = attach_trace),
> SEC_DEF("fexit/", TRACING,
> .expected_attach_type = BPF_TRACE_FEXIT,
> .is_attach_btf = true,
> --
> 2.20.1
>