David Holland wrote: > On Sat, Aug 25, 2018 at 11:26:07AM +0100, Alexander Nasonov wrote: > > 1. It's not standartised and it will very likely change in future versions > > That doesn't really matter as long as you're only using one version at > a time...
If bytecode is generated from a valid Lua program, it's indeed takes very little effort to update to a new version. But updating handcrafted bytecode may take a bit of time. > > 2. There is no bpf_validate for Lua bytecode. In fact, Lua team abandoned > > an idea of bytecode validation few years ago. From Lua 5.3 manual: > > > > Lua does not check the consistency of binary chunks. Maliciously > > crafted binary chunks can crash the interpreter. > > Are we talking about installing untrusted/unprivileged kernel trace > logic? Because that seems like a bad idea, or at least a very hard > thing to get right... and if not, it doesn't matter if there's a > validator. Lua bytecode is turing complete and not validatable but I'm pretty sure some subset of it (e.g. no loops, no strings, etc) can be validated. > (Also, isn't EBPF not really validatable either, or am I mixing it > up with something else?) Last I checked, the author(s) of eBPF claimed that it can be validated. -- Alex