[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 11 Nov 2021 10:19:32 -0800
From: Andrii Nakryiko <andrii.nakryiko@...il.com>
To: Stanislav Fomichev <sdf@...gle.com>
Cc: Networking <netdev@...r.kernel.org>, bpf <bpf@...r.kernel.org>,
Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
Andrii Nakryiko <andrii@...nel.org>,
Quentin Monnet <quentin@...valent.com>,
John Fastabend <john.fastabend@...il.com>
Subject: Re: [PATCH bpf-next v2] bpftool: enable libbpf's strict mode by default
On Wed, Nov 10, 2021 at 11:23 AM Stanislav Fomichev <sdf@...gle.com> wrote:
>
> Otherwise, attaching with bpftool doesn't work with strict section names.
>
> Also:
>
> - add --legacy option to switch back to pre-1.0 behavior
> - print a warning when program fails to load in strict mode to point
> to --legacy flag
> - by default, don't append / to the section name; in strict
> mode it's relevant only for a small subset of prog types
>
LGTM. I'll wait for Quenting's ack before applying. Thanks!
> + bpftool --legacy prog loadall tools/testing/selftests/bpf/test_cgroup_link.o /sys/fs/bpf/kprobe type kprobe
> libbpf: failed to pin program: File exists
> Error: failed to pin all programs
> + bpftool prog loadall tools/testing/selftests/bpf/test_cgroup_link.o /sys/fs/bpf/kprobe type kprobe
>
> v2:
> - strict by default (Quentin Monnet)
> - add more info to --legacy description (Quentin Monnet)
> - add bash completion (Quentin Monnet)
>
> Cc: Quentin Monnet <quentin@...valent.com>
> Cc: John Fastabend <john.fastabend@...il.com>
> Signed-off-by: Stanislav Fomichev <sdf@...gle.com>
> ---
> .../bpftool/Documentation/common_options.rst | 9 +++++
> tools/bpf/bpftool/bash-completion/bpftool | 2 +-
> tools/bpf/bpftool/main.c | 13 +++++-
> tools/bpf/bpftool/main.h | 3 +-
> tools/bpf/bpftool/prog.c | 40 +++++++++++--------
> 5 files changed, 48 insertions(+), 19 deletions(-)
>
[...]
Powered by blists - more mailing lists