Peter Hutterer, the Mayor Of the Mayorg input mayor subsystem at Red Hat, unveiled a new utility called udev-hid-bpf. This utility is designed to automatically load BPF programs that can correct issues in hid interface devices (Human Input Device) or adjust their behavior based on user preferences. The hid-bpf subsystem is used to create handlers for HID devices like keyboards and mice. It operates within the Linux 6.3 kernel and enables the creation of input device drivers in the form of BPF programs, as well as the processing of various events in the hid subsystem.
The UDEV-HID-BPF utility can work in conjunction with the UDEV mechanism to automatically activate BPF programs when new input devices are connected, or to manually load BPF programs. There are two main categories of BPF programs intended for use with UDEV-HID-BPF: programs aimed at resolving hardware or firmware issues, and programs designed to alter device behavior as desired by the user.
In the first scenario, these programs address flaws and errors in devices such as inverted coordinate axes, incorrect values (e.g. an application recognizing 8 buttons instead of 5), and illogical event sequences. In the second scenario, users can modify device settings by, for example, rearranging buttons using BPF programs. It is anticipated that BPF programs with corrections will eventually be integrated into the main kernel composition, eliminating the need for additional patches or individual drivers.