New Attempt Pursued At Using eBPF Within Linux's HID Subsystem
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.
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.
8 Comments