diff options
author | Andrii Nakryiko <andrii@kernel.org> | 2023-11-30 10:52:18 -0800 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2023-12-06 10:02:59 -0800 |
commit | e1cef620f598853a90f17701fcb1057a6768f7b8 (patch) | |
tree | 95d4f672f64ffeba968c3f8b8174783e52b093cb /tools/testing/selftests/bpf/prog_tests/libbpf_probes.c | |
parent | ee54b1a910e4d49c9a104f31ae3f5b979131adf8 (diff) |
bpf: add BPF token support to BPF_PROG_LOAD command
Add basic support of BPF token to BPF_PROG_LOAD. Wire through a set of
allowed BPF program types and attach types, derived from BPF FS at BPF
token creation time. Then make sure we perform bpf_token_capable()
checks everywhere where it's relevant.
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/r/20231130185229.2688956-7-andrii@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/libbpf_probes.c')
-rw-r--r-- | tools/testing/selftests/bpf/prog_tests/libbpf_probes.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/testing/selftests/bpf/prog_tests/libbpf_probes.c b/tools/testing/selftests/bpf/prog_tests/libbpf_probes.c index 573249a2814d..4ed46ed58a7b 100644 --- a/tools/testing/selftests/bpf/prog_tests/libbpf_probes.c +++ b/tools/testing/selftests/bpf/prog_tests/libbpf_probes.c @@ -30,6 +30,8 @@ void test_libbpf_probe_prog_types(void) if (prog_type == BPF_PROG_TYPE_UNSPEC) continue; + if (strcmp(prog_type_name, "__MAX_BPF_PROG_TYPE") == 0) + continue; if (!test__start_subtest(prog_type_name)) continue; |