aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/bpf/prog_tests/fd_array.c
diff options
context:
space:
mode:
authorAnton Protopopov <[email protected]>2024-12-13 13:09:31 +0000
committerAndrii Nakryiko <[email protected]>2024-12-13 22:48:36 +0000
commit4d3ae294f900fb7232fb6c890dbd3176b8a5f121 (patch)
tree5c95ffae365d7f4987bce5ef0ac06c9234961923 /tools/testing/selftests/bpf/prog_tests/fd_array.c
parentbpf: Refactor check_pseudo_btf_id (diff)
downloadkernel-4d3ae294f900fb7232fb6c890dbd3176b8a5f121.tar.gz
kernel-4d3ae294f900fb7232fb6c890dbd3176b8a5f121.zip
bpf: Add fd_array_cnt attribute for prog_load
The fd_array attribute of the BPF_PROG_LOAD syscall may contain a set of file descriptors: maps or btfs. This field was introduced as a sparse array. Introduce a new attribute, fd_array_cnt, which, if present, indicates that the fd_array is a continuous array of the corresponding length. If fd_array_cnt is non-zero, then every map in the fd_array will be bound to the program, as if it was used by the program. This functionality is similar to the BPF_PROG_BIND_MAP syscall, but such maps can be used by the verifier during the program load. Signed-off-by: Anton Protopopov <[email protected]> Signed-off-by: Andrii Nakryiko <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/fd_array.c')
0 files changed, 0 insertions, 0 deletions