diff options
| author | Andrii Nakryiko <[email protected]> | 2024-01-23 18:21:03 -0800 | 
|---|---|---|
| committer | Alexei Starovoitov <[email protected]> | 2024-01-24 16:21:01 -0800 | 
| commit | caf8f28e036c4ba1e823355da6c0c01c39e70ab9 (patch) | |
| tree | bc60a1165bbbf9e13a1fa840f27298af3cbee67d /tools/testing/selftests/bpf/prog_tests/libbpf_probes.c | |
| parent | 9ea7c4bf17e39d463eb4782f948f401d9764b1b3 (diff) | |
bpf: Add BPF token support to BPF_PROG_LOAD command
Add basic support of BPF token to BPF_PROG_LOAD. BPF_F_TOKEN_FD flag
should be set in prog_flags field when providing prog_token_fd.
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 <[email protected]>
Signed-off-by: Alexei Starovoitov <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
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; |