[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240607-hid_bpf_struct_ops-v2-11-3f95f4d02292@kernel.org>
Date: Fri, 07 Jun 2024 17:28:31 +0200
From: Benjamin Tissoires <bentiss@...nel.org>
To: Shuah Khan <shuah@...nel.org>, Jiri Kosina <jikos@...nel.org>,
Jonathan Corbet <corbet@....net>, Alexei Starovoitov <ast@...nel.org>
Cc: linux-kselftest@...r.kernel.org, linux-kernel@...r.kernel.org,
bpf@...r.kernel.org, linux-input@...r.kernel.org, linux-doc@...r.kernel.org,
Benjamin Tissoires <bentiss@...nel.org>
Subject: [PATCH HID v2 11/16] 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.
Signed-off-by: Benjamin Tissoires <bentiss@...nel.org>
---
no changes in v2
---
Documentation/hid/hid-bpf.rst | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
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
===========================
--
2.44.0
Powered by blists - more mailing lists