Struct solana_rbpf::vm::Config

source ·
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: 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

§external_internal_function_hash_collision: bool

Throw ElfError::SymbolHashCollision when a BPF function collides with a registered syscall

§reject_callx_r10: bool

Have the verifier reject “callx r10”

§optimize_rodata: bool

Avoid copying read only sections when possible

§new_elf_parser: bool

Use the new ELF parser

§aligned_memory_mapping: bool

Use aligned memory mapping

§enable_sbpf_v1: bool

Allow ExecutableCapability::V1

§enable_sbpf_v2: bool

Allow ExecutableCapability::V2

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Copy for Config

source§

impl Eq for Config

source§

impl StructuralEq for Config

source§

impl StructuralPartialEq for Config

Auto Trait Implementations§

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> 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> ToOwned for T
where T: Clone,

§

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>,

§

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>,

§

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

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

§

fn vzip(self) -> V