Closed Lichtso closed 11 months ago
Merging #535 (b4391ac) into main (b1b50f7) will decrease coverage by
0.16%
. The diff coverage is95.08%
.
@@ Coverage Diff @@
## main #535 +/- ##
==========================================
- Coverage 89.70% 89.55% -0.16%
==========================================
Files 24 24
Lines 10213 10094 -119
==========================================
- Hits 9162 9040 -122
- Misses 1051 1054 +3
Files | Coverage Δ | |
---|---|---|
src/interpreter.rs | 98.81% <100.00%> (-0.03%) |
:arrow_down: |
src/jit.rs | 91.49% <100.00%> (-0.49%) |
:arrow_down: |
src/vm.rs | 85.90% <100.00%> (+0.06%) |
:arrow_up: |
src/program.rs | 80.58% <90.90%> (+2.50%) |
:arrow_up: |
This drastically simplifies the vm interface of
BuiltinFunction
s so that it becomes a lot closer to the vm internal call interface:ContextObject
,MemoryMapping
andProgramResult
the encrypted pointer to the entire EbpfVm is passed, which is then decrypted and decomposed insidedeclare_builtin_function()
. Thanks to #534, this does not even require swapping of argument registers.declare_builtin_function()
, which does not only deduplicate the logic, but also allows LLVM to optimize the register allocation, spilling and perform inlining, effectively reducing the cost of a syscall from three context switches between the VM and Rust ABI, down to one.Unfortunately, encrypt_runtime_environment is now no longer optional as we can not read the config of the VM without dereferencing the potentially encrypted VM pointer.