pub enum SBPFVersion {
V0,
V1,
V2,
V3,
Reserved,
}
Expand description
Defines a set of sbpf_version of an executable
Variants§
V0
The legacy format
V1
SIMD-0166
V2
SIMD-0174, SIMD-0173
V3
SIMD-0178, SIMD-0179, SIMD-0189
Reserved
Used for future versions
Implementations§
Source§impl SBPFVersion
impl SBPFVersion
Sourcepub fn dynamic_stack_frames(self) -> bool
pub fn dynamic_stack_frames(self) -> bool
Enable SIMD-0166: SBPF dynamic stack frames
Sourcepub fn enable_pqr(self) -> bool
pub fn enable_pqr(self) -> bool
Enable SIMD-0174: SBPF arithmetics improvements
Sourcepub fn explicit_sign_extension_of_results(self) -> bool
pub fn explicit_sign_extension_of_results(self) -> bool
… SIMD-0174
Sourcepub fn swap_sub_reg_imm_operands(self) -> bool
pub fn swap_sub_reg_imm_operands(self) -> bool
… SIMD-0174
Sourcepub fn disable_neg(self) -> bool
pub fn disable_neg(self) -> bool
… SIMD-0174
Sourcepub fn callx_uses_src_reg(self) -> bool
pub fn callx_uses_src_reg(self) -> bool
Enable SIMD-0173: SBPF instruction encoding improvements
Sourcepub fn disable_lddw(self) -> bool
pub fn disable_lddw(self) -> bool
… SIMD-0173
Sourcepub fn disable_le(self) -> bool
pub fn disable_le(self) -> bool
… SIMD-0173
Sourcepub fn move_memory_instruction_classes(self) -> bool
pub fn move_memory_instruction_classes(self) -> bool
… SIMD-0173
Sourcepub fn static_syscalls(self) -> bool
pub fn static_syscalls(self) -> bool
Enable SIMD-0178: SBPF Static Syscalls Enable SIMD-0179: SBPF stricter verification constraints
Sourcepub fn enable_stricter_elf_headers(self) -> bool
pub fn enable_stricter_elf_headers(self) -> bool
Enable SIMD-0189: SBPF stricter ELF headers
Sourcepub fn enable_lower_bytecode_vaddr(self) -> bool
pub fn enable_lower_bytecode_vaddr(self) -> bool
… SIMD-0189
Sourcepub fn reject_rodata_stack_overlap(self) -> bool
pub fn reject_rodata_stack_overlap(self) -> bool
Ensure that rodata sections don’t exceed their maximum allowed size and overlap with the stack
Sourcepub fn enable_elf_vaddr(self) -> bool
pub fn enable_elf_vaddr(self) -> bool
Allow sh_addr != sh_offset in elf sections.
Sourcepub fn calculate_call_imm_target_pc(self, pc: usize, imm: i64) -> u32
pub fn calculate_call_imm_target_pc(self, pc: usize, imm: i64) -> u32
Calculate the target program counter for a CALL_IMM instruction depending on the SBPF version.
Trait Implementations§
Source§impl Clone for SBPFVersion
impl Clone for SBPFVersion
Source§fn clone(&self) -> SBPFVersion
fn clone(&self) -> SBPFVersion
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for SBPFVersion
impl Debug for SBPFVersion
Source§impl PartialEq for SBPFVersion
impl PartialEq for SBPFVersion
Source§impl PartialOrd for SBPFVersion
impl PartialOrd for SBPFVersion
impl Copy for SBPFVersion
impl Eq for SBPFVersion
impl StructuralPartialEq for SBPFVersion
Auto Trait Implementations§
impl Freeze for SBPFVersion
impl RefUnwindSafe for SBPFVersion
impl Send for SBPFVersion
impl Sync for SBPFVersion
impl Unpin for SBPFVersion
impl UnwindSafe for SBPFVersion
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more