Skip to content

Commit 5f42e19

Browse files
author
Benjamin Tissoires
committed
Documentation: HID: add a small blurb on udev-hid-bpf
This is the current decision we took: we don't provide automatic loading of HID-BPF by the kernel directly, but rely on an external tool for it. This tool is currently udev-hid-bpf, so let's make people aware of it. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Benjamin Tissoires <[email protected]>
1 parent c595869 commit 5f42e19

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

Documentation/hid/hid-bpf.rst

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,23 @@ When a BPF program needs to emit input events, it needs to talk with the HID
129129
protocol, and rely on the HID kernel processing to translate the HID data into
130130
input events.
131131

132+
In-tree HID-BPF programs and ``udev-hid-bpf``
133+
=============================================
134+
135+
Official device fixes are shipped in the kernel tree as source in the
136+
``drivers/hid/bpf/progs`` directory. This allows to add selftests to them in
137+
``tools/testing/selftests/hid``.
138+
139+
However, the compilation of these objects is not part of a regular kernel compilation
140+
given that they need an external tool to be loaded. This tool is currently
141+
`udev-hid-bpf <https://libevdev.pages.freedesktop.org/udev-hid-bpf/index.html>`_.
142+
143+
For convenience, that external repository duplicates the files from here in
144+
``drivers/hid/bpf/progs`` into its own ``src/bpf/stable`` directory. This allows
145+
distributions to not have to pull the entire kernel source tree to ship and package
146+
those HID-BPF fixes. ``udev-hid-bpf`` also has capabilities of handling multiple
147+
objects files depending on the kernel the user is running.
148+
132149
Available types of programs
133150
===========================
134151

0 commit comments

Comments
 (0)