-
Notifications
You must be signed in to change notification settings - Fork 175
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add new syscall
instruction to the verifier
#620
Conversation
How about having |
ebpf::CALL_IMM if sbpf_version.static_syscalls() && insn.src == 0 => { check_call_target(insn.imm as u32, syscall_registry)?; }, | ||
ebpf::CALL_IMM if sbpf_version.static_syscalls() => { | ||
check_call_target( | ||
insn.imm as u32, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BTW, I noticed that this uses absolute addressing while the SIMD says: "immediate field must only be interpreted as a relative address to jump from the program counter". So, either one must be changed to match the other.
This is an alternative implementation of #614 for SIMD-0178.
This PR adds the new syscall instruction to the verifier and write tests for it. It also introduces a dense function registry in the loader and distinguishes it from the sparse registry.
Execution tests for syscalls are only working for SBPFv1 and will be revamped once the instruction is properly implemented in the interpreter and jitter.