pub struct Config {Show 18 fields
pub max_call_depth: usize,
pub stack_frame_size: usize,
pub enable_address_translation: bool,
pub enable_stack_frame_gaps: bool,
pub instruction_meter_checkpoint_distance: usize,
pub enable_instruction_meter: bool,
pub enable_instruction_tracing: bool,
pub enable_symbol_and_section_labels: bool,
pub reject_broken_elfs: bool,
pub noop_instruction_rate: u32,
pub sanitize_user_provided_values: bool,
pub external_internal_function_hash_collision: bool,
pub reject_callx_r10: bool,
pub optimize_rodata: bool,
pub new_elf_parser: bool,
pub aligned_memory_mapping: bool,
pub enable_sbpf_v1: bool,
pub enable_sbpf_v2: bool,
}Expand description
VM configuration settings
Fields§
§max_call_depth: usizeMaximum call depth
stack_frame_size: usizeSize of a stack frame in bytes, must match the size specified in the LLVM BPF backend
enable_address_translation: boolEnables the use of MemoryMapping and MemoryRegion for address translation
enable_stack_frame_gaps: boolEnables gaps in VM address space between the stack frames
instruction_meter_checkpoint_distance: usizeMaximal pc distance after which a new instruction meter validation is emitted by the JIT
enable_instruction_meter: boolEnable instruction meter and limiting
enable_instruction_tracing: boolEnable instruction tracing
enable_symbol_and_section_labels: boolEnable dynamic string allocation for labels
reject_broken_elfs: boolReject ELF files containing issues that the verifier did not catch before (up to v0.2.21)
noop_instruction_rate: u32Ratio of native host instructions per random no-op in JIT (0 = OFF)
sanitize_user_provided_values: boolEnable disinfection of immediate values and offsets provided by the user in JIT
external_internal_function_hash_collision: boolThrow ElfError::SymbolHashCollision when a BPF function collides with a registered syscall
reject_callx_r10: boolHave the verifier reject “callx r10”
optimize_rodata: boolAvoid copying read only sections when possible
new_elf_parser: boolUse the new ELF parser
aligned_memory_mapping: boolUse aligned memory mapping
enable_sbpf_v1: boolAllow ExecutableCapability::V1
enable_sbpf_v2: boolAllow ExecutableCapability::V2
Implementations§
Trait Implementations§
impl Copy for Config
impl Eq for Config
impl StructuralPartialEq for Config
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
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
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
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>
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>
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