New Attempt Pursued At Using eBPF Within Linux's HID Subsystem

Written by Michael Larabel in Hardware on 22 April 2022 at 05:20 AM EDT. 8 Comments
HARDWARE
Back in February was the interesting work laid out by Red Hat engineers for their looking at using eBPF within the kernel's HID subsystem. A new patch series attempting this innovative use of the in-kernel JIT virtual machine has been published.

Benjamin Tissoires of Red Hat has been the one spearheading the work on allowing eBPF usage within the HID subsystem. Making use of eBPF within HID could be very useful in dealing with quirky devices - currently there is lots of simple drivers and quirks for just correcting a key or byte in the report descriptor for input events. Unfortunately with the current approach with the input drivers being in the mainline kernel and the time it takes for upstreaming and getting down to vendor kernels is painful for users. The idea is that with eBPF'ing HID these "fix-ups" could be externalized in some external repository and ship these fixes as various eBPF programs that would be loaded at boot time to avoid needing a new kernel for quirky/buggy hardware. Usage of eBPF with HID could also allow for better supporting some newer/innovative devices like the Microsoft Surface Dial or USI stylus where the exposed kernel API is currently limited.

Various technical issues and feedback were raised from the earlier three rounds of patches working on eBPF support for HID. Benjamin on Thursday sent out a rewritten version of the patches, which are still a work-in-progress and thus labeled with a "request for comments" in seeking more feedback on this innovative approach.

If interested in HID devices / eBPF usage, see this patch series for more details on this latest interesting use-case for eBPF within the Linux kernel.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week