justincormack / ljsyscall

LuaJIT Unix syscall FFI
http://www.myriabit.com/ljsyscall/
Other
440 stars 54 forks source link

Linux: support for eBPF + added new syscalls #189

Closed vavrusa closed 8 years ago

vavrusa commented 8 years ago

eBPF is an extension of BPF added in Linux 3.19 for executing sandboxed code directly in kernel for, socket filtering, kprobes, tracing and hopefully a lot more in the future. I'm writing a compiler from LuaJIT bytecode to eBPF bytecode and need the bpf syscall that wasn't covered in ljsyscall

justincormack commented 8 years ago

Hi, thats great, but the Ci is failing here https://travis-ci.org/justincormack/ljsyscall/builds/120200913#L592

I think the easiest way is to rename the bpf tests to test_bpf_root in which case it will not try to run them, as it needs cap_sys_admin to use bpf.

vavrusa commented 8 years ago

Ah right, will fix that.

vavrusa commented 8 years ago

Fixed, also added new eBPF opcodes and instruction format, so it can be used without translating.

justincormack commented 8 years ago

Thanks, thats a very useful contribution!

vavrusa commented 8 years ago

I'm writing LuaJIT bytecode to eBPF compiler, and using ljsyscall for putting it in use. Thanks for starting ljsyscall, it's really cool!