Re:BPF for Hid Drivers
by Karliss on Wednesday November 16, 2022 @02:57PM
(#33629583)
Isn't BPF execution constraints intentionally very tight, 4096 instruction, 512 bytes of stack, limited control flow? I don't think it's currently usable to implement general purpose drivers. Only reason it could work for HID drivers is because a lot of them are doing nothing more than very simple byte substitution either in device descriptor or the actual data reports. So I am not too worried about closed source driver.
[ Parent
| on HN ]
eBPF has changed several of these constraints [0]
- Verifier can explore up to 1million insns now instead of 4096
- 512 bytes of stack but with tail chaining you have up to 8k
- Bounded loops have been added. Unbounded loops are prevented by design to not stall the kernel