Lunatik is a framework for scripting the Linux kernel with Lua. It is composed by the Lua interpreter modified to run in the kernel; a device driver (written in Lua =)) and a command line tool to load and run scripts and manage runtime environments from the user space; a C API to load and run scripts and manage runtime environments from the kernel; and Lua APIs for binding kernel facilities to Lua scripts.
↫ Lunatik GitHub page
I’m not knowledgeable enough to understand what this might be used for, but I figured y’all would be interested in this.
I have a simple rule: If Linus wouldn’t want something in the kernel, I don’t want that thing in the kernel.
That whole thing is just a security vulnerability and given how easy Lua is to code, anyone could write some code that either crashes the OS or do priv escalation.
NetBSD and FreeBSD have had it for a long time, and it doesn’t seem to have caused them issues. And it’s probably a better idea than eBPF.