qmonnet / rbpf

Rust virtual machine and JIT compiler for eBPF programs
Apache License 2.0
922 stars 235 forks source link

Update behaviour for divisions by zero #66

Closed qmonnet closed 1 year ago

qmonnet commented 1 year ago

Update rbpf's behaviour for operations that include potential divisions by zero (32-bit and 64-bit division and modulo operations from immediate or register). The new behaviour is as follows:

This updated behaviour is aligned on what Linux does, and on what the (in-progress) eBPF specification requires.

Update the interpreter and the JIT accordingly, update the verifier, update the tests, and enable the relevant conformance tests in the GitHub workflow.

Fixes: #53 Fixes: #54 Fixes: #56