pub enum SBPFVersion {
V1,
V2,
V3,
}Expand description
Defines a set of sbpf_version of an executable
Variants§
Implementations§
Source§impl SBPFVersion
impl SBPFVersion
Sourcepub fn enable_neg(&self) -> bool
pub fn enable_neg(&self) -> bool
Enable the negation instruction
Sourcepub fn swap_sub_reg_imm_operands(&self) -> bool
pub fn swap_sub_reg_imm_operands(&self) -> bool
Swaps the reg and imm operands of the subtraction instruction
Sourcepub fn enable_lddw(&self) -> bool
pub fn enable_lddw(&self) -> bool
Enable the only two slots long instruction: LD_DW_IMM
Sourcepub fn enable_pqr(&self) -> bool
pub fn enable_pqr(&self) -> bool
Enable the BPF_PQR instruction class
Sourcepub fn callx_uses_src_reg(&self) -> bool
pub fn callx_uses_src_reg(&self) -> bool
Use src reg instead of imm in callx
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. Used in V2 to align section vaddrs to MM_PROGRAM_START.
Sourcepub fn dynamic_stack_frames(&self) -> bool
pub fn dynamic_stack_frames(&self) -> bool
Use dynamic stack frame sizes
Sourcepub fn static_syscalls(&self) -> bool
pub fn static_syscalls(&self) -> bool
Support syscalls via pseudo calls (insn.src = 0)
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
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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