pub struct MemoryRegion {
pub base_address: u64,
pub size: usize,
pub is_readable: bool,
pub is_writable: bool,
pub is_executable: bool,
}Expand description
Memory region descriptor for kernel hashing.
Passed to Sha3_512Kernel::hash_memory_regions, which hashes each
region for which is_readable is true and size is a nonzero value
not exceeding MAX_HASH_SIZE, skipping the rest. The caller is
responsible for the region actually being valid, mapped memory at
base_address for size bytes — see kernel_safe and
Sha3_512Kernel::hash_memory_region for the unsafe contract this
descriptor feeds into.
Fields§
§base_address: u64Starting virtual address of the region.
size: usizeLength of the region in bytes.
is_readable: boolWhether the region is safe to read. Regions with is_readable == false are skipped by Sha3_512Kernel::hash_memory_regions.
is_writable: boolWhether the region is writable. Informational only — not consulted by the hashing path, which only reads.
is_executable: boolWhether the region is executable. Informational only — not consulted by the hashing path, which only reads.
Trait Implementations§
Source§impl Clone for MemoryRegion
impl Clone for MemoryRegion
Source§impl Debug for MemoryRegion
impl Debug for MemoryRegion
Source§impl<'de> Deserialize<'de> for MemoryRegion
impl<'de> Deserialize<'de> for MemoryRegion
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for MemoryRegion
impl RefUnwindSafe for MemoryRegion
impl Send for MemoryRegion
impl Sync for MemoryRegion
impl Unpin for MemoryRegion
impl UnsafeUnpin for MemoryRegion
impl UnwindSafe for MemoryRegion
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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