Struct Config

Source
pub struct Config {
Show 14 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 optimize_rodata: bool, pub aligned_memory_mapping: bool, pub enabled_sbpf_versions: RangeInclusive<SBPFVersion>,
}
Expand description

VM configuration settings

Fields§

§max_call_depth: usize

Maximum call depth

§stack_frame_size: usize

Size of a stack frame in bytes, must match the size specified in the LLVM BPF backend

§enable_address_translation: bool

Enables the use of MemoryMapping and MemoryRegion for address translation

§enable_stack_frame_gaps: bool

Enables gaps in VM address space between the stack frames

§instruction_meter_checkpoint_distance: usize

Maximal pc distance after which a new instruction meter validation is emitted by the JIT

§enable_instruction_meter: bool

Enable instruction meter and limiting

§enable_instruction_tracing: bool

Enable instruction tracing

§enable_symbol_and_section_labels: bool

Enable dynamic string allocation for labels

§reject_broken_elfs: bool

Reject ELF files containing issues that the verifier did not catch before (up to v0.2.21)

§noop_instruction_rate: u32

Ratio of native host instructions per random no-op in JIT (0 = OFF)

§sanitize_user_provided_values: bool

Enable disinfection of immediate values and offsets provided by the user in JIT

§optimize_rodata: bool

Avoid copying read only sections when possible

§aligned_memory_mapping: bool

Use aligned memory mapping

§enabled_sbpf_versions: RangeInclusive<SBPFVersion>

Allowed SBPFVersions

Implementations§

Source§

impl Config

Source

pub fn stack_size(&self) -> usize

Returns the size of the stack memory region

Trait Implementations§

Source§

impl Clone for Config

Source§

fn clone(&self) -> Config

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Config

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Config

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl PartialEq for Config

Source§

fn eq(&self, other: &Config) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Eq for Config

Source§

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V