5 ms·
eBPF is not for general purpose computation, it mostly functions as a sophisticated query language for extracting data, it doesn't even have loops. it is not co
by throwaway2048 7y ago
eBPF is not for general purpose computation, it mostly functions as a sophisticated query language for extracting data, it doesn't even have loops. it is not comparable to WASM.
- Spivak 7y agoeBPF does have loops and it is absolutely for general purpose computation. The verifier that exists in the Linux kernel works very hard to make sure that you are not allowed to load programs with unbounded loops but you most certainly can when those restrictions are lifted.
- throwaway2048 7y agoThis is trivial, when people talk about eBPF they are talking about the implementation, its like saying you could put lisp code in C, if only you modified the C compiler.
- loeg 7y agoWhy do you think the Linux kernel is the only eBPF implementation?
- Spivak 7y agoThe implementation that exists in Linux is perfectly capable of running unbounded loops. But it runs your program through a function that rejects your program if it can't prove that it terminates. The point being that you could rip the eBPF implementation out of the kernel, remove the verify check and have a very usable VM. Here's a implementation that exists because of the GPL: https://github.com/iovisor/ubpf https://github.com/iovisor/ubpf.