This repository has been archived by the owner on Jan 10, 2025. It is now read-only.
forked from qmonnet/rbpf
-
Notifications
You must be signed in to change notification settings - Fork 180
Add new syscall
instruction to the verifier
#620
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
How about having |
Lichtso
reviewed
Oct 21, 2024
Lichtso
reviewed
Oct 21, 2024
Lichtso
reviewed
Oct 21, 2024
Lichtso
approved these changes
Oct 22, 2024
Lichtso
reviewed
Oct 30, 2024
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.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.