On Fri, May 7, 2021 at 8:49 PM Alexei Starovoitov <alexei.starovoitov@xxxxxxxxx> wrote: > > From: Alexei Starovoitov <ast@xxxxxxxxxx> > > 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. > > Signed-off-by: Alexei Starovoitov <ast@xxxxxxxxxx> > --- LGTM. Acked-by: Andrii Nakryiko <andrii@xxxxxxxxxx> > include/linux/bpf.h | 1 + > include/uapi/linux/bpf.h | 7 ++++ > kernel/bpf/btf.c | 62 ++++++++++++++++++++++++++++++++++ > kernel/bpf/syscall.c | 2 ++ > tools/include/uapi/linux/bpf.h | 7 ++++ > 5 files changed, 79 insertions(+) > [...]