pub struct LinuxOs<Driver>where
Driver: VmiDriver,{ /* private fields */ }
Expand description
VMI operations for the Linux operating system.
LinuxOs
provides methods and utilities for introspecting a Linux-based
virtual machine. It encapsulates Linux-specific knowledge and operations,
allowing for high-level interactions with the guest OS structures and processes.
Implementations§
Source§impl<Driver> LinuxOs<Driver>
impl<Driver> LinuxOs<Driver>
Locates and retrieves the Linux banner string from kernel memory.
The banner string typically contains kernel version information and build details.
Sourcepub fn kaslr_offset(vmi: VmiState<'_, Driver, Self>) -> Result<u64, VmiError>
pub fn kaslr_offset(vmi: VmiState<'_, Driver, Self>) -> Result<u64, VmiError>
Returns the KASLR (Kernel Address Space Layout Randomization) offset.
This value represents the randomized offset applied to the kernel’s base address when KASLR is enabled.
Sourcepub fn per_cpu(vmi: VmiState<'_, Driver, Self>) -> Va
pub fn per_cpu(vmi: VmiState<'_, Driver, Self>) -> Va
Retrieves the per-CPU base address for the current CPU.
Linux maintains per-CPU data structures, and this method returns the base address for accessing such data on the current processor.
Sourcepub fn linked_list<'a>(
vmi: VmiState<'a, Driver, Self>,
list_head: Va,
offset: u64,
) -> Result<impl Iterator<Item = Result<Va, VmiError>> + 'a, VmiError>
pub fn linked_list<'a>( vmi: VmiState<'a, Driver, Self>, list_head: Va, offset: u64, ) -> Result<impl Iterator<Item = Result<Va, VmiError>> + 'a, VmiError>
Returns an iterator over a doubly-linked list of LIST_ENTRY
structures.
This method is used to iterate over a doubly-linked list of LIST_ENTRY
structures in memory. It returns an iterator that yields the virtual
addresses of each LIST_ENTRY
structure in the list.
Sourcepub fn construct_path(
_vmi: VmiState<'_, Driver, Self>,
path: &LinuxPath<'_, Driver>,
root: &LinuxPath<'_, Driver>,
) -> Result<String, VmiError>
pub fn construct_path( _vmi: VmiState<'_, Driver, Self>, path: &LinuxPath<'_, Driver>, root: &LinuxPath<'_, Driver>, ) -> Result<String, VmiError>
Constructs a file path string from path components in the kernel.
This method walks the dentry chain to build a complete path, handling
mount points and filesystem boundaries appropriately. Both the path
and root
arguments should be pointers to struct path
objects.