Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

HID: bpf: enforce HID_BPF dependencies

As mentioned in the link below, having JIT and BPF is not enough to
have fentry/fexit/fmod_ret APIs. This resolves the error that
happens on a system without tracing enabled when hid-bpf tries to
load itself.

Link: https://lore.kernel.org/r/CABRcYmKyRchQhabi1Vd9RcMQFCcb=EtWyEbFDFRTc-L-U8WhgA@mail.gmail.com
Fixes: f5c27da4e3c8 ("HID: initial BPF implementation")
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Reviewed-by: Florent Revest <revest@chromium.org>
Reviewed-by: Jiri Kosina <jkosina@suse.cz>
Link: https://lore.kernel.org/r/20221206145936.922196-4-benjamin.tissoires@redhat.com

+2 -1
+2 -1
drivers/hid/bpf/Kconfig
··· 4 4 config HID_BPF 5 5 bool "HID-BPF support" 6 6 default HID_SUPPORT 7 - depends on BPF && BPF_SYSCALL 7 + depends on BPF && BPF_SYSCALL && \ 8 + DYNAMIC_FTRACE_WITH_DIRECT_CALLS 8 9 help 9 10 This option allows to support eBPF programs on the HID subsystem. 10 11 eBPF programs can fix HID devices in a lighter way than a full