Add new helper: long bpf_btf_find_by_name_kind(char *name, int name_sz, u32 kind, int flags) Description Find BTF type with given name and kind in vmlinux BTF or in module's BTFs. Return Returns btf_id and btf_obj_fd in lower and upper 32 bits. It will be used by loader program to find btf_id to attach the program to and to find btf_ids of ksyms.
Showing the changes to tools/include/uapi/linux (1 of 5 files). Show all
Unified · Split
| @@ -4748,6 +4748,12 @@ union bpf_attr { · 4747 unmodified lines | ||
| 4748 | 4748 | * Execute bpf syscall with given arguments. |
| 4749 | 4749 | * Return |
| 4750 | 4750 | * A syscall result. |
| 4751 | + * | |
| 4752 | + * long bpf_btf_find_by_name_kind(char *name, int name_sz, u32 kind, int flags) | |
| 4753 | + * Description | |
| 4754 | + * Find BTF type with given name and kind in vmlinux BTF or in module's BTFs. | |
| 4755 | + * Return | |
| 4756 | + * Returns btf_id and btf_obj_fd in lower and upper 32 bits. | |
| 4751 | 4757 | */ |
| 4752 | 4758 | #define __BPF_FUNC_MAPPER(FN) \ |
| 4753 | 4759 | FN(unspec), \ |
| @@ -4917,6 +4923,7 @@ union bpf_attr { · 163 unmodified lines | ||
| 4917 | 4923 | FN(for_each_map_elem), \ |
| 4918 | 4924 | FN(snprintf), \ |
| 4919 | 4925 | FN(sys_bpf), \ |
| 4926 | + FN(btf_find_by_name_kind), \ | |
| 4920 | 4927 | /* */ |
| 4921 | 4928 | |
| 4922 | 4929 | /* integer value in 'imm' field of BPF_CALL instruction selects which helper |