diff options
author | Andrii Nakryiko <andrii@kernel.org> | 2023-04-07 01:41:50 +0200 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2023-04-11 18:05:43 +0200 |
commit | e0aee1facccf9f12136600031be4ce21eb810a78 (patch) | |
tree | 6f82d968fd9cad102590270fce23bc20c5751552 /tools | |
parent | bpf: Switch BPF verifier log to be a rotating log by default (diff) | |
download | linux-e0aee1facccf9f12136600031be4ce21eb810a78.tar.xz linux-e0aee1facccf9f12136600031be4ce21eb810a78.zip |
libbpf: Don't enforce unnecessary verifier log restrictions on libbpf side
This basically prevents any forward compatibility. And we either way
just return -EINVAL, which would otherwise be returned from bpf()
syscall anyways.
Similarly, drop enforcement of non-NULL log_buf when log_level > 0. This
won't be true anymore soon.
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Lorenz Bauer <lmb@isovalent.com>
Link: https://lore.kernel.org/bpf/20230406234205.323208-5-andrii@kernel.org
Diffstat (limited to 'tools')
-rw-r--r-- | tools/lib/bpf/bpf.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/tools/lib/bpf/bpf.c b/tools/lib/bpf/bpf.c index 767035900354..f1d04ee14d83 100644 --- a/tools/lib/bpf/bpf.c +++ b/tools/lib/bpf/bpf.c @@ -290,10 +290,6 @@ int bpf_prog_load(enum bpf_prog_type prog_type, if (!!log_buf != !!log_size) return libbpf_err(-EINVAL); - if (log_level > (4 | 2 | 1)) - return libbpf_err(-EINVAL); - if (log_level && !log_buf) - return libbpf_err(-EINVAL); func_info_rec_size = OPTS_GET(opts, func_info_rec_size, 0); func_info = OPTS_GET(opts, func_info, NULL); |