libbpf: Add opts-based bpf_obj_pin() API and add support for path_fd

Add path_fd support for bpf_obj_pin() and bpf_obj_get() operations
(through their opts-based variants). This allows to take advantage of
new kernel-side support for O_PATH-based pin/get location specification.

Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20230523170013.728457-4-andrii@kernel.org
Signed-off-by: Daniel Müller <deso@posteo.net>
This commit is contained in:
Andrii Nakryiko
2023-05-15 17:01:58 -07:00
committed by Andrii Nakryiko
parent bfb0454244
commit a50544ef45
3 changed files with 32 additions and 5 deletions

View File

@@ -393,4 +393,6 @@ LIBBPF_1.2.0 {
} LIBBPF_1.1.0;
LIBBPF_1.3.0 {
global:
bpf_obj_pin_opts;
} LIBBPF_1.2.0;