summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorBenjamin Tissoires <bentiss@kernel.org>2024-06-08 11:01:23 +0200
committerBenjamin Tissoires <bentiss@kernel.org>2024-06-14 11:20:20 +0200
commit5f42e19de53faf9e6d4455638f75b7c3a3f8d58f (patch)
tree5bd6b5b9745dc40b6a8736e9885e057794363a33 /Documentation
parentc5958697a5fa29d3ba9332205a88725afe9ed912 (diff)
downloadlwn-5f42e19de53faf9e6d4455638f75b7c3a3f8d58f.tar.gz
lwn-5f42e19de53faf9e6d4455638f75b7c3a3f8d58f.zip
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/20240608-hid_bpf_struct_ops-v3-11-6ac6ade58329@kernel.org Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/hid/hid-bpf.rst17
1 files changed, 17 insertions, 0 deletions
diff --git a/Documentation/hid/hid-bpf.rst b/Documentation/hid/hid-bpf.rst
index 456e15097d87..8ae8f49801cb 100644
--- a/Documentation/hid/hid-bpf.rst
+++ b/Documentation/hid/hid-bpf.rst
@@ -129,6 +129,23 @@ When a BPF program needs to emit input events, it needs to talk with the HID
protocol, and rely on the HID kernel processing to translate the HID data into
input events.
+In-tree HID-BPF programs and ``udev-hid-bpf``
+=============================================
+
+Official device fixes are shipped in the kernel tree as source in the
+``drivers/hid/bpf/progs`` directory. This allows to add selftests to them in
+``tools/testing/selftests/hid``.
+
+However, the compilation of these objects is not part of a regular kernel compilation
+given that they need an external tool to be loaded. This tool is currently
+`udev-hid-bpf <https://libevdev.pages.freedesktop.org/udev-hid-bpf/index.html>`_.
+
+For convenience, that external repository duplicates the files from here in
+``drivers/hid/bpf/progs`` into its own ``src/bpf/stable`` directory. This allows
+distributions to not have to pull the entire kernel source tree to ship and package
+those HID-BPF fixes. ``udev-hid-bpf`` also has capabilities of handling multiple
+objects files depending on the kernel the user is running.
+
Available types of programs
===========================