vmi-os-linux 0.13.0

Linux OS specific code for VMI
Documentation
mod amd64;

use vmi_core::{Architecture, Va, VmiCore, VmiError, VmiState, driver::VmiRead};

use crate::LinuxOs;

pub trait ArchAdapter<Driver>: Architecture
where
    Driver: VmiRead<Architecture = Self>,
{
    fn syscall_argument(vmi: VmiState<LinuxOs<Driver>>, index: u64) -> Result<u64, VmiError>;

    fn function_argument(vmi: VmiState<LinuxOs<Driver>>, index: u64) -> Result<u64, VmiError>;

    fn function_return_value(vmi: VmiState<LinuxOs<Driver>>) -> Result<u64, VmiError>;

    fn find_banner(
        vmi: &VmiCore<Driver>,
        registers: &<Driver::Architecture as Architecture>::Registers,
    ) -> Result<Option<String>, VmiError>;

    fn kernel_image_base(vmi: VmiState<LinuxOs<Driver>>) -> Result<Va, VmiError>;

    fn kaslr_offset(vmi: VmiState<LinuxOs<Driver>>) -> Result<u64, VmiError>;

    fn per_cpu(vmi: VmiState<LinuxOs<Driver>>) -> Va;
}