IndirectSyscall

Struct IndirectSyscall 

Source
pub struct IndirectSyscall { /* private fields */ }
Expand description

indirect syscall invoker

instead of using inline syscall instruction, jumps to the syscall instruction inside ntdll for cleaner call stack

Implementations§

Source§

impl IndirectSyscall

Source

pub const unsafe fn new_unchecked(ssn: u16, syscall_addr: usize) -> Self

create from SSN and syscall instruction address

§Safety

caller must ensure syscall_addr points to a valid syscall instruction

Source

pub fn new(ssn: u16, syscall_addr: usize) -> Result<Self>

create from SSN and syscall instruction address with validation

Source

pub fn from_entry(entry: &SyscallEntry) -> Result<Self>

create from syscall entry

Source

pub fn from_table(table: &SyscallTable, name: &str) -> Result<Self>

create from syscall table lookup

Source

pub const fn ssn(&self) -> u16

get SSN

Source

pub const fn syscall_address(&self) -> usize

get syscall instruction address

Source§

impl IndirectSyscall

Source

pub unsafe fn call0(&self) -> i32

invoke indirect syscall with 0 arguments

§Safety

caller must ensure the syscall is appropriate to call with 0 args

Source

pub unsafe fn call1(&self, arg1: usize) -> i32

invoke indirect syscall with 1 argument

§Safety

caller must ensure args are valid for this syscall

Source

pub unsafe fn call2(&self, arg1: usize, arg2: usize) -> i32

invoke indirect syscall with 2 arguments

§Safety

caller must ensure args are valid for this syscall

Source

pub unsafe fn call3(&self, arg1: usize, arg2: usize, arg3: usize) -> i32

invoke indirect syscall with 3 arguments

§Safety

caller must ensure args are valid for this syscall

Source

pub unsafe fn call4( &self, arg1: usize, arg2: usize, arg3: usize, arg4: usize, ) -> i32

invoke indirect syscall with 4 arguments

§Safety

caller must ensure args are valid for this syscall

Source

pub unsafe fn call5( &self, arg1: usize, arg2: usize, arg3: usize, arg4: usize, arg5: usize, ) -> i32

invoke indirect syscall with 5 arguments

§Safety

caller must ensure args are valid for this syscall

Source

pub unsafe fn call6( &self, arg1: usize, arg2: usize, arg3: usize, arg4: usize, arg5: usize, arg6: usize, ) -> i32

invoke indirect syscall with 6 arguments

§Safety

caller must ensure args are valid for this syscall

Source

pub unsafe fn call_many(&self, args: &[usize]) -> i32

invoke indirect syscall with variable arguments

§Safety

caller must ensure args are valid for this syscall

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