linux/drivers/hid/bpf
Benjamin Tissoires 9286675a2a HID: bpf: add HID-BPF hooks for hid_hw_output_report
Same story than hid_hw_raw_requests:

This allows to intercept and prevent or change the behavior of
hid_hw_output_report() from a bpf program.

The intent is to solve a couple of use case:
  - firewalling a HID device: a firewall can monitor who opens the hidraw
    nodes and then prevent or allow access to write operations on that
    hidraw node.
  - change the behavior of a device and emulate a new HID feature request

The hook is allowed to be run as sleepable so it can itself call
hid_hw_output_report(), which allows to "convert" one feature request into
another or even call the feature request on a different HID device on the
same physical device.

Link: https://patch.msgid.link/20240626-hid_hw_req_bpf-v2-7-cfd60fb6c79f@kernel.org
Acked-by: Jiri Kosina <jkosina@suse.com>
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
2024-06-27 11:00:45 +02:00
..
progs hid: bpf: Fix grammar 2024-06-27 09:21:40 +02:00
hid_bpf_dispatch.c HID: bpf: add HID-BPF hooks for hid_hw_output_report 2024-06-27 11:00:45 +02:00
hid_bpf_dispatch.h HID: bpf: prevent infinite recursions with hid_hw_raw_requests hooks 2024-06-27 11:00:12 +02:00
hid_bpf_struct_ops.c HID: bpf: add HID-BPF hooks for hid_hw_output_report 2024-06-27 11:00:45 +02:00
Kconfig
Makefile HID: bpf: remove tracing HID-BPF capability 2024-06-14 11:20:20 +02:00