rbpf
rbpf copied to clipboard
Rust virtual machine and JIT compiler for eBPF programs
I run it in router [Linux RT-AC68U 2.6.36.4brcmarm #1 SMP PREEMPT Fri May 10 22:16:14 CST 2019 armv7l GNU/Linux], execute_program_jit is alway Segmentation fault main.rs: ``` extern crate rbpf; fn...
Input [in.zip](https://github.com/qmonnet/rbpf/files/6827728/in.zip) Code ```rust fn main() { // let filepath = input file in the zip let data = std::fs::read(filepath).unwrap(); if let Ok(vm) = rbpf::EbpfVmNoData::new(Some(&data)) { vm.execute_program(); } } ```...
As explained in the commit message of 038ddf7: > https://doc.rust-lang.org/std/fmt/trait.LowerHex.html says "For primitive signed integers (i8 to i128, and isize), negative values are formatted as the two’s complement representation." >...
Input [in.zip](https://github.com/qmonnet/rbpf/files/6827761/in.zip) Code ```rust fn main() { // let filepath = input file in the zip let data = std::fs::read(filepath).unwrap(); if let Ok(vm) = rbpf::EbpfVmNoData::new(Some(&data)) { vm.execute_program(); } } ```...
Input [in.zip](https://github.com/qmonnet/rbpf/files/6827753/in.zip) Code ```rust fn main() { // let filepath = input file in the zip let data = std::fs::read(filepath).unwrap(); if let Ok(vm) = rbpf::EbpfVmNoData::new(Some(&data)) { vm.execute_program(); } } ```...
Input [in.zip](https://github.com/qmonnet/rbpf/files/6827739/in.zip) Code ```rust fn main() { // let filepath = input file in the zip let data = std::fs::read(filepath).unwrap(); if let Ok(vm) = rbpf::EbpfVmNoData::new(Some(&data)) { vm.execute_program(); } } ```...
eBPF in Linux kernel just got extended to use the `0x06` class of instructions for 32-bit jumps. See [the merge commit](https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git/commit/?id=ae575c8a9868c2247c6ba287b91f0420e27aad4b) and its parents. This should land in kernel 5.1....
https://github.com/qmonnet/rbpf/blob/ceb7fa67946a7a6e9cff5a4e03ae721a1ecf10b6/src/jit.rs#L380
Would be great to have rbpf compiling on Windows. Quoting @badboy: > [AppVeyor](https://www.appveyor.com/) is free and easy to setup as CI as well to run the build. The jitting might...
Working on #6, looking at #10, #9 and #8. I see that we have a lack of high-level stack of `bpf` instructions. Personally, I see it as the following: ```rust...