Skip to content

Commit

Permalink
HID: bpf: enforce HID_BPF dependencies
Browse files Browse the repository at this point in the history
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: f5c27da ("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
  • Loading branch information
Benjamin Tissoires committed Dec 10, 2022
1 parent 8602015 commit 4e0b1b0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/hid/bpf/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ menu "HID-BPF support"
config HID_BPF
bool "HID-BPF support"
default HID_SUPPORT
depends on BPF && BPF_SYSCALL
depends on BPF && BPF_SYSCALL && \
DYNAMIC_FTRACE_WITH_DIRECT_CALLS
help
This option allows to support eBPF programs on the HID subsystem.
eBPF programs can fix HID devices in a lighter way than a full
Expand Down

0 comments on commit 4e0b1b0

Please sign in to comment.