BPF: the universal in-kernel virtual machine
Much of the recent discussion regarding the
Ktap dynamic tracing system was
focused on the addition of a Lua interpreter and virtual machine to the
kernel. Virtual machines seem like an inappropriate component to be
running in kernel space.
But, in truth, the kernel already contains more than one virtual
machine. One of those, the BPF interpreter, has been growing in features
and performance; it now looks to be taking on roles beyond its original
purpose. In the process, it may result in a net reduction in interpreter
code in the kernel.