Re: [PATCH] bpf: export btf_find_by_name_kind and bpf_base_func_proto

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

 



On Tue, Jul 23, 2024 at 09:43:12PM -0700, Kui-Feng Lee wrote:
> 
> 
> On 7/23/24 20:19, Ming Lei wrote:
> > Export btf_find_by_name_kind and bpf_base_func_proto, so that kernel
> > module can use them.
> > 
> > Almost all existed struct_ops users(hid, sched_ext, ...) need the two APIs.
> > 
> > Without this change, hid-bpf can't be built as module.
> 
> Could you give me more context?
> Give me a link of an example code or something?
> Or explain the use case?

The merged patchset "Registrating struct_ops types from modules" is
trying to allow module to register struct_ops, which often needs
bpf_base_func_proto()(for allowing generic helpers available in
prog) and btf_find_by_name_kind() (for implementing .btf_struct_access).

One example is hid-bpf, which is a driver and supposed to build as module,
but it can't be done because the two APIs aren't exported.

I am working on ublk bpf support, which needs bpf_base_func_proto() at
least, and might require btf_find_by_name_kind() in future.


Thanks,
Ming





[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