On 7/26/24 5:59 AM, Ming Lei wrote:
Almost all existed struct_ops users(hid, sched_ext, ...) need the two APIs. In-tree hid-bpf code(drivers/hid/bpf/hid_bpf_struct_ops.c) can't be built as module because the two APIs aren't exported.
The patch looks fine. I don't see "config HID_BPF" can be built as a module now though that could expose this issue. Did I miss something?
Export btf_find_by_name_kind and bpf_base_func_proto, so that any kernel module can use them given bpf community is supporting to register struct_ops in module, see the patchset "Registrating struct_ops types from modules"[1], which is merged to v6.9.