Pin
Loading...
Searching...
No Matches
Functions
PinRT Support Functions

Functions

template<class... Args>
t_syscall_ret OS_Syscall_unsafe (t_syscall_id syscall_id, Args... args)
 
template<class... Args>
t_syscall_ret OS_Syscall_safe (enum PINOS_SYSCALL_OP opType, t_syscall_id syscall_id, Args... args)
 

Detailed Description

Function Documentation

◆ OS_Syscall_safe()

template<class... Args>
t_syscall_ret OS_Syscall_safe ( enum PINOS_SYSCALL_OP  opType,
t_syscall_id  syscall_id,
Args...  args 
)
inline

Call a native syscall while trying to to maintain isolation mechanisms using PINOS SYS_native_syscall_safe generic system call.

Parameters
opTypePINOS_SOP_NOP_SUCCESS - return SYSRET(SUCCESS) without doing anything PINOS_SOP_NOP_FAILURE - return SYSRET(EPERM) without doing anything PINOS_SOP_DO_UNSAFE - Execute the specified system call bypassing isolation mechanisms using homemade SYS_native_syscall_unsafe system call (executed locally) Return system call return code. This is the same as calling OS_Syscall_unsafe PINOS_SOP_ISOLATION - Execute the specified system call trying to maintain isolation mechanisms using homemade SYS_native_syscall_safe system call (executed locally) Return system call return code.
syscall_idNative Syscall ID (Not PINOS Syscall ID !!!!!!!!! - Use __NR_xxx macros rather than SYS_xxx macros)
...Native system call arguments
Returns
The return value of ths PINOS syscall. Return values follow the linux convention. Values in the range [-4095,-1] Are errors.

◆ OS_Syscall_unsafe()

template<class... Args>
t_syscall_ret OS_Syscall_unsafe ( t_syscall_id  syscall_id,
Args...  args 
)
inline

Call a native syscall bypassing isolation mechanisms using the PINOS SYS_native_syscall_unsafe generic system call.

Parameters
syscall_idNative Syscall ID (Not PINOS Syscall ID !!!!!!!!! - Use __NR_xxx macros rather than SYS_xxx macros)
...Native system call arguments
Returns
The return value of ths PINOS syscall. Return values follow the linux convention. Values in the range [-4095,-1] Are errors.