-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
selftests/bpf: Excercise bpf_obj_get_info_by_fd for bpf2bpf
Apparently, no existing selftest covers it. Add a new one where we load cgroup/bind4 program and attach fentry to it. Calling bpf_obj_get_info_by_fd on the fentry program should return non-zero btf_id/btf_obj_id instead of crashing the kernel. v3: - move into fexit_bpf2bpf.c (Martin) - assert on skel->links.bind_v4_prog (Andrii) - do no close(-1) unconditionally (Andrii) v2: - use ret instead of err in find_prog_btf_id (Hao) - remove verifier log (Hao) - drop if conditional from ASSERT_OK(bpf_obj_get_info_by_fd(...)) (Hao) Acked-by: Martin KaFai Lau <kafai@fb.com> Signed-off-by: Stanislav Fomichev <sdf@google.com>
- Loading branch information
Showing
1 changed file
with
95 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters