Re: [PATCH v4 bpf-next 10/22] bpf: Add bpf_btf_find_by_name_kind() helper.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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(+)
>

[...]



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux