Bug 218320 - HID-BPF fails to initialise, EINVAL
Summary: HID-BPF fails to initialise, EINVAL
Status: NEW
Alias: None
Product: Linux
Classification: Unclassified
Component: Kernel (show other bugs)
Hardware: All Linux
: P3 normal
Assignee: Virtual assignee for kernel bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-12-25 23:29 UTC by Chris Rankin
Modified: 2023-12-28 00:10 UTC (History)
0 users

See Also:
Kernel Version: 6.6.8
Subsystem: hid-bpf
Regression: No
Bisected commit-id:


Attachments
Kernel config for 6.6.8 (176.78 KB, text/plain)
2023-12-25 23:29 UTC, Chris Rankin
Details

Description Chris Rankin 2023-12-25 23:29:22 UTC
Created attachment 305655 [details]
Kernel config for 6.6.8

Trying to configure a 6.6.8 kernel to use HID-BPF, but it fails to initialise:

[    3.210054] hid_bpf: error while preloading HID BPF dispatcher: -22

The issue appears to relate to entrypoints_bpf__load(), specifically the "run" stage of bpf_load_and_run().

This is almost certainly a configuration issue, and so I have attached my kernel config. I suspect that hid-bpf has a missing extra dependency beyond CONFIG_DYNAMIC_FTRACE_WITH_DIRECT_CALLS=y.
Comment 1 Chris Rankin 2023-12-28 00:10:25 UTC
FWIW I have discovered that my kernel was missing CONFIG_DEBUG_INFO_BTF, and I also hadn't installed the pahole tool on my build machine. Perhaps the Kconfig rules need updating?

Note You need to log in before you can comment on or make changes to this bug.