diff options
author | Andrii Nakryiko <andrii@kernel.org> | 2022-10-10 16:49:45 -0700 |
---|---|---|
committer | Andrii Nakryiko <andrii@kernel.org> | 2022-10-10 16:49:45 -0700 |
commit | f6ac03ebeb07ed70bdb8fbde9e1d69f8e9707565 (patch) | |
tree | ac20de3e8053e3d82b65622bfe106d4243101fe4 /tools/testing/selftests/bpf/prog_tests/perf_buffer.c | |
parent | 2e30960097f6bc1a0dff89c0bcbc4138e3506d7c (diff) | |
parent | a9c7c18b57594c72a63fad749021b743c65a098b (diff) |
Merge branch 'Add _opts variant for bpf_*_get_fd_by_id()'
Roberto Sassu says:
====================
From: Roberto Sassu <roberto.sassu@huawei.com>
Add the _opts variant for bpf_*_get_fd_by_id() functions, to be able to
pass to the kernel more options, when requesting a fd of an eBPF object.
Pass the options through a newly introduced structure,
bpf_get_fd_by_id_opts, which currently contains open_flags (the other two
members are for compatibility and for padding).
open_flags allows the caller to request specific permissions to access a
map (e.g. read-only). This is useful for example in the situation where a
map is write-protected.
Besides patches 2-6, which introduce the new variants and the data
structure, patch 1 fixes the LIBBPF_1.0.0 declaration in libbpf.map.
Changelog
v1:
- Don't CC stable kernel mailing list for patch 1 (suggested by Andrii)
- Rename bpf_get_fd_opts struct to bpf_get_fd_by_id_opts (suggested by
Andrii)
- Move declaration of _opts variants after non-opts variants (suggested by
Andrii)
- Correctly initialize bpf_map_info, fix style issues, use map from
skeleton, check valid fd in the test (suggested by Andrii)
- Rename libbpf_get_fd_opts test to libbpf_get_fd_by_id_opts
====================
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/perf_buffer.c')
0 files changed, 0 insertions, 0 deletions