mirror of
https://github.com/netdata/libbpf.git
synced 2026-04-02 06:39:07 +08:00
libbpf: Introduce bpf_get_fd_by_id_opts and bpf_map_get_fd_by_id_opts()
Define a new data structure called bpf_get_fd_by_id_opts, with the member open_flags, to be used by callers of the _opts variants of bpf_*_get_fd_by_id() to specify the permissions needed for the file descriptor to be obtained. Also, introduce bpf_map_get_fd_by_id_opts(), to let the caller pass a bpf_get_fd_by_id_opts structure. Finally, keep the existing bpf_map_get_fd_by_id(), and call bpf_map_get_fd_by_id_opts() with NULL as opts argument, to request read-write permissions (current behavior). Signed-off-by: Roberto Sassu <roberto.sassu@huawei.com> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/20221006110736.84253-3-roberto.sassu@huaweicloud.com
This commit is contained in:
committed by
Andrii Nakryiko
parent
07024c87de
commit
a719cae6aa
@@ -371,6 +371,7 @@ LIBBPF_1.0.0 {
|
||||
|
||||
LIBBPF_1.1.0 {
|
||||
global:
|
||||
bpf_map_get_fd_by_id_opts;
|
||||
user_ring_buffer__discard;
|
||||
user_ring_buffer__free;
|
||||
user_ring_buffer__new;
|
||||
|
||||
Reference in New Issue
Block a user