3 ms·
> An important point is that once compiled, an eBPF program is guaranteed to halt … That's made me curious. Got any links or search terms I can use to learn mo
by bigiain 8y ago
> An important point is that once compiled, an eBPF program is guaranteed to halt …
That's made me curious. Got any links or search terms I can use to learn more about that?
I'm guessing nobody has solved the halting problem, I wonder what constraints are? Is the eBPF programming language not Turning Complete? Are the inputs bound in a way that means they don't need a general solution to the halting problem? Does the eBPF program get compiled with a killswitch to guarantee halting?
- teej 8y agoFrom elsewhere in the thread I found this link https://lwn.net/Articles/740157/ https://lwn.net/Articles/740157/ > There are inherent security and stability risks with allowing user-space code to run inside the kernel. So, a number of checks are performed on every eBPF program before it is loaded. The first test ensures that the eBPF program terminates and does not contain any loops that could cause the kernel to lock up. This is checked by doing a depth-first search of the program's control flow graph (CFG). Unreachable instructions are strictly prohibited; any program that contains unreachable instructions will fail to load.
- bigiain 8y agoThanks!