Hacker News new | ask | show | jobs
by perlgeek 2009 days ago
Is it possible to write device drivers in eBPF?

(I've asked this before, but haven't gotten any response, and no clear answer from Google/DDG either).

1 comments

eBPF isn't Turing complete after being verified so I would assume no.
Do device drivers typically need to be Turing complete? I would have expect drivers for simple USB devices for example to be pretty simple state machines.
I'm not sure. Even if you could do it in eBPF, I really don't think you could get it past the verifier because it's not just like formal verification it actually has to be trivially bounded (so parts of it definitely could be done without Turing completeness but you ain't writing your GPU driver in it).

The JIT isn't necessarily turned on so it's probably not a great idea in the first place