Hutterer: udev-hid-bpf: quickstart tooling to fix your HID devices with eBPF

Post Syndicated from corbet original https://lwn.net/Articles/970702/

Peter Hutterer announces
udev-hid-bpf
, a tool to facilitate the loading of BPF programs that
make human-input devices work correctly.

eBPF was originally written for network packet filters but as of
kernel v6.3 and thanks to Benjamin, we have BPF in the HID
subsystem. HID actually lends itself really well to BPF because,
well, we have a byte array and to fix our devices we need to do
complicated things like “toggle that bit to zero” or “swap those
two values”.

See this article for more information on
the BPF-HID mechanism.