Struct shadow_rs::host::syscall::handler::SyscallHandler

source ·
pub struct SyscallHandler { /* private fields */ }

Implementations§

source§

impl SyscallHandler

source

pub fn clone( ctx: &mut SyscallContext<'_, '_>, flags_and_exit_signal: i32, child_stack: ForeignPtr<()>, ptid: ForeignPtr<kernel_pid_t>, ctid: ForeignPtr<kernel_pid_t>, newtls: u64, ) -> Result<kernel_pid_t, Errno>

source

pub fn clone3( ctx: &mut SyscallContext<'_, '_>, args: ForeignPtr<clone_args>, args_size: usize, ) -> Result<kernel_pid_t, Errno>

source

pub fn fork(ctx: &mut SyscallContext<'_, '_>) -> Result<kernel_pid_t, Errno>

source

pub fn vfork(ctx: &mut SyscallContext<'_, '_>) -> Result<kernel_pid_t, Errno>

source

pub fn gettid(ctx: &mut SyscallContext<'_, '_>) -> Result<kernel_pid_t, Errno>

source

pub fn capget( ctx: &mut SyscallContext<'_, '_>, hdrp: ForeignPtr<user_cap_header>, datap: ForeignPtr<[user_cap_data; 2]>, ) -> Result<(), Errno>

source

pub fn capset( ctx: &mut SyscallContext<'_, '_>, hdrp: ForeignPtr<user_cap_header>, datap: ForeignPtr<[user_cap_data; 2]>, ) -> Result<(), Errno>

source§

impl SyscallHandler

source

pub fn close_range( ctx: &mut SyscallContext<'_, '_>, first: c_uint, last: c_uint, flags: c_uint, ) -> Result<(), Errno>

source§

impl SyscallHandler

source

pub fn epoll_create( ctx: &mut SyscallContext<'_, '_>, size: c_int, ) -> Result<DescriptorHandle, Errno>

source

pub fn epoll_create1( ctx: &mut SyscallContext<'_, '_>, flags: c_int, ) -> Result<DescriptorHandle, Errno>

source

pub fn epoll_ctl( ctx: &mut SyscallContext<'_, '_>, epfd: c_int, op: c_int, fd: c_int, event_ptr: ForeignPtr<epoll_event>, ) -> Result<(), Errno>

source

pub fn epoll_wait( ctx: &mut SyscallContext<'_, '_>, epfd: c_int, events_ptr: ForeignPtr<epoll_event>, max_events: c_int, timeout: c_int, ) -> Result<c_int, SyscallError>

source

pub fn epoll_pwait( ctx: &mut SyscallContext<'_, '_>, epfd: c_int, events_ptr: ForeignPtr<epoll_event>, max_events: c_int, timeout: c_int, sigmask_ptr: ForeignPtr<sigset_t>, _sigsetsize: kernel_size_t, ) -> Result<c_int, SyscallError>

source

pub fn epoll_pwait2( ctx: &mut SyscallContext<'_, '_>, epfd: c_int, events_ptr: ForeignPtr<epoll_event>, max_events: c_int, timeout_ptr: ForeignPtr<timespec>, sigmask_ptr: ForeignPtr<sigset_t>, _sigsetsize: kernel_size_t, ) -> Result<c_int, SyscallError>

source§

impl SyscallHandler

source

pub fn eventfd( ctx: &mut SyscallContext<'_, '_>, init_val: c_uint, ) -> Result<DescriptorHandle, Errno>

source

pub fn eventfd2( ctx: &mut SyscallContext<'_, '_>, init_val: c_uint, flags: c_int, ) -> Result<DescriptorHandle, Errno>

source§

impl SyscallHandler

source

pub fn fcntl( ctx: &mut SyscallContext<'_, '_>, fd: c_uint, cmd: c_uint, arg: c_ulong, ) -> Result<c_long, SyscallError>

source§

impl SyscallHandler

source

pub fn open( ctx: &mut SyscallContext<'_, '_>, _path: ForeignPtr<()>, _flags: c_int, _mode: kernel_mode_t, ) -> SyscallResult

source

pub fn creat(ctx: &mut SyscallContext<'_, '_>) -> SyscallResult

source

pub fn fadvise64(ctx: &mut SyscallContext<'_, '_>) -> SyscallResult

source

pub fn fallocate(ctx: &mut SyscallContext<'_, '_>) -> SyscallResult

source

pub fn fchmod(ctx: &mut SyscallContext<'_, '_>) -> SyscallResult

source

pub fn fchown(ctx: &mut SyscallContext<'_, '_>) -> SyscallResult

source

pub fn fdatasync(ctx: &mut SyscallContext<'_, '_>) -> SyscallResult

source

pub fn fgetxattr(ctx: &mut SyscallContext<'_, '_>) -> SyscallResult

source

pub fn flistxattr(ctx: &mut SyscallContext<'_, '_>) -> SyscallResult

source

pub fn flock(ctx: &mut SyscallContext<'_, '_>) -> SyscallResult

source

pub fn fremovexattr(ctx: &mut SyscallContext<'_, '_>) -> SyscallResult

source

pub fn fsetxattr(ctx: &mut SyscallContext<'_, '_>) -> SyscallResult

source

pub fn fsync(ctx: &mut SyscallContext<'_, '_>) -> SyscallResult

source

pub fn ftruncate(ctx: &mut SyscallContext<'_, '_>) -> SyscallResult

source

pub fn getdents(ctx: &mut SyscallContext<'_, '_>) -> SyscallResult

source

pub fn getdents64(ctx: &mut SyscallContext<'_, '_>) -> SyscallResult

source

pub fn lseek( ctx: &mut SyscallContext<'_, '_>, fd: c_uint, _offset: kernel_off_t, _whence: c_uint, ) -> Result<kernel_off_t, SyscallError>

source

pub fn readahead(ctx: &mut SyscallContext<'_, '_>) -> SyscallResult

source

pub fn sync_file_range(ctx: &mut SyscallContext<'_, '_>) -> SyscallResult

source

pub fn syncfs(ctx: &mut SyscallContext<'_, '_>) -> SyscallResult

source§

impl SyscallHandler

source

pub fn openat( ctx: &mut SyscallContext<'_, '_>, _dir_fd: c_int, _path: ForeignPtr<()>, _flags: c_int, _mode: kernel_mode_t, ) -> SyscallResult

source

pub fn faccessat(ctx: &mut SyscallContext<'_, '_>) -> SyscallResult

source

pub fn fchmodat(ctx: &mut SyscallContext<'_, '_>) -> SyscallResult

source

pub fn fchmodat2(ctx: &mut SyscallContext<'_, '_>) -> SyscallResult

source

pub fn fchownat(ctx: &mut SyscallContext<'_, '_>) -> SyscallResult

source

pub fn futimesat(ctx: &mut SyscallContext<'_, '_>) -> SyscallResult

source

pub fn linkat(ctx: &mut SyscallContext<'_, '_>) -> SyscallResult

source

pub fn mkdirat(ctx: &mut SyscallContext<'_, '_>) -> SyscallResult

source

pub fn mknodat(ctx: &mut SyscallContext<'_, '_>) -> SyscallResult

source

pub fn readlinkat(ctx: &mut SyscallContext<'_, '_>) -> SyscallResult

source

pub fn renameat(ctx: &mut SyscallContext<'_, '_>) -> SyscallResult

source

pub fn renameat2(ctx: &mut SyscallContext<'_, '_>) -> SyscallResult

source

pub fn symlinkat(ctx: &mut SyscallContext<'_, '_>) -> SyscallResult

source

pub fn unlinkat(ctx: &mut SyscallContext<'_, '_>) -> SyscallResult

source

pub fn utimensat(ctx: &mut SyscallContext<'_, '_>) -> SyscallResult

source§

impl SyscallHandler

source

pub fn futex( ctx: &mut SyscallContext<'_, '_>, _uaddr: ForeignPtr<u32>, _op: c_int, _val: u32, _utime: ForeignPtr<kernel_timespec>, _uaddr2: ForeignPtr<u32>, _val3: u32, ) -> Result<c_int, SyscallError>

source

pub fn get_robust_list( _ctx: &mut SyscallContext<'_, '_>, _pid: c_int, _head_ptr: ForeignPtr<ForeignPtr<robust_list_head>>, _len_ptr: ForeignPtr<size_t>, ) -> Result<(), Errno>

source

pub fn set_robust_list( _ctx: &mut SyscallContext<'_, '_>, _head: ForeignPtr<robust_list_head>, _len: size_t, ) -> Result<(), Errno>

source§

impl SyscallHandler

source

pub fn ioctl( ctx: &mut SyscallContext<'_, '_>, fd: c_uint, cmd: c_uint, arg_ptr: ForeignPtr<()>, ) -> SyscallResult

source§

impl SyscallHandler

source

pub fn brk( ctx: &mut SyscallContext<'_, '_>, addr: ForeignPtr<u8>, ) -> Result<ForeignPtr<u8>, SyscallError>

source

pub fn mremap( ctx: &mut SyscallContext<'_, '_>, old_addr: c_ulong, old_size: c_ulong, new_size: c_ulong, flags: c_ulong, new_addr: c_ulong, ) -> Result<ForeignPtr<u8>, SyscallError>

source

pub fn munmap( ctx: &mut SyscallContext<'_, '_>, addr: c_ulong, len: usize, ) -> Result<(), SyscallError>

source

pub fn mprotect( ctx: &mut SyscallContext<'_, '_>, addr: c_ulong, len: usize, prot: c_ulong, ) -> Result<(), SyscallError>

source

pub fn mmap( ctx: &mut SyscallContext<'_, '_>, addr: c_ulong, len: c_ulong, prot: c_ulong, flags: c_ulong, fd: c_ulong, offset: c_ulong, ) -> Result<ForeignPtr<u8>, Errno>

source§

impl SyscallHandler

source

pub fn poll( ctx: &mut SyscallContext<'_, '_>, _ufds: ForeignPtr<pollfd>, _nfds: c_uint, _timeout_msecs: c_int, ) -> Result<c_int, SyscallError>

source

pub fn ppoll( ctx: &mut SyscallContext<'_, '_>, _ufds: ForeignPtr<pollfd>, _nfds: c_uint, _tsp: ForeignPtr<kernel_timespec>, _sigmask: ForeignPtr<sigset_t>, _sigsetsize: size_t, ) -> Result<c_int, SyscallError>

source§

impl SyscallHandler

source

pub fn prctl( ctx: &mut SyscallContext<'_, '_>, option: PrctlOp, arg2: c_ulong, _arg3: c_ulong, _arg4: c_ulong, _arg5: c_ulong, ) -> Result<c_int, SyscallError>

source§

impl SyscallHandler

source

pub fn getrandom( ctx: &mut SyscallContext<'_, '_>, buf_ptr: ForeignPtr<u8>, count: usize, _flags: c_uint, ) -> Result<isize, Errno>

source§

impl SyscallHandler

source

pub fn prlimit64( _ctx: &mut SyscallContext<'_, '_>, pid: kernel_pid_t, resource: c_uint, _new_rlim: ForeignPtr<()>, _old_rlim: ForeignPtr<()>, ) -> Result<(), SyscallError>

source§

impl SyscallHandler

source

pub fn sched_getaffinity( ctx: &mut SyscallContext<'_, '_>, tid: kernel_pid_t, cpusetsize: usize, mask_ptr: ForeignPtr<c_ulong>, ) -> Result<c_int, Errno>

source

pub fn sched_setaffinity( ctx: &mut SyscallContext<'_, '_>, tid: kernel_pid_t, cpusetsize: usize, mask_ptr: ForeignPtr<c_ulong>, ) -> Result<(), Errno>

source

pub fn rseq( ctx: &mut SyscallContext<'_, '_>, rseq_ptr: ForeignPtr<MaybeUninit<u8>>, rseq_len: u32, flags: c_int, _sig: u32, ) -> Result<(), Errno>

source§

impl SyscallHandler

source§

impl SyscallHandler

source

pub fn shadow_yield(_ctx: &mut SyscallContext<'_, '_>) -> Result<(), Errno>

source

pub fn shadow_init_memory_manager( ctx: &mut SyscallContext<'_, '_>, ) -> Result<(), Errno>

source

pub fn shadow_hostname_to_addr_ipv4( ctx: &mut SyscallContext<'_, '_>, name_ptr: ForeignPtr<c_char>, name_len: u64, addr_ptr: ForeignPtr<()>, addr_len: u64, ) -> Result<(), Errno>

source§

impl SyscallHandler

source

pub fn kill( ctx: &mut SyscallContext<'_, '_>, pid: kernel_pid_t, sig: c_int, ) -> Result<(), Errno>

source

pub fn tkill( ctx: &mut SyscallContext<'_, '_>, tid: kernel_pid_t, sig: c_int, ) -> Result<(), Errno>

source

pub fn tgkill( ctx: &mut SyscallContext<'_, '_>, tgid: kernel_pid_t, tid: kernel_pid_t, sig: c_int, ) -> Result<(), Errno>

source

pub fn rt_sigaction( ctx: &mut SyscallContext<'_, '_>, _sig: c_int, _act: ForeignPtr<sigaction>, _oact: ForeignPtr<sigaction>, _sigsetsize: size_t, ) -> Result<(), SyscallError>

source

pub fn rt_sigprocmask( ctx: &mut SyscallContext<'_, '_>, _how: c_int, _nset: ForeignPtr<sigset_t>, _oset: ForeignPtr<sigset_t>, _sigsetsize: size_t, ) -> Result<(), SyscallError>

source

pub fn sigaltstack( ctx: &mut SyscallContext<'_, '_>, _uss: ForeignPtr<stack_t>, _uoss: ForeignPtr<stack_t>, ) -> Result<(), SyscallError>

source§

impl SyscallHandler

source

pub fn socket( ctx: &mut SyscallContext<'_, '_>, domain: c_int, socket_type: c_int, protocol: c_int, ) -> Result<DescriptorHandle, Errno>

source

pub fn bind( ctx: &mut SyscallContext<'_, '_>, fd: c_int, addr_ptr: ForeignPtr<u8>, addr_len: socklen_t, ) -> Result<(), SyscallError>

source

pub fn sendto( ctx: &mut SyscallContext<'_, '_>, fd: c_int, buf_ptr: ForeignPtr<u8>, buf_len: size_t, flags: c_int, addr_ptr: ForeignPtr<u8>, addr_len: socklen_t, ) -> Result<ssize_t, SyscallError>

source

pub fn sendmsg( ctx: &mut SyscallContext<'_, '_>, fd: c_int, msg_ptr: ForeignPtr<msghdr>, flags: c_int, ) -> Result<ssize_t, SyscallError>

source

pub fn recvfrom( ctx: &mut SyscallContext<'_, '_>, fd: c_int, buf_ptr: ForeignPtr<u8>, buf_len: size_t, flags: c_int, addr_ptr: ForeignPtr<u8>, addr_len_ptr: ForeignPtr<socklen_t>, ) -> Result<ssize_t, SyscallError>

source

pub fn recvmsg( ctx: &mut SyscallContext<'_, '_>, fd: c_int, msg_ptr: ForeignPtr<msghdr>, flags: c_int, ) -> Result<ssize_t, SyscallError>

source

pub fn getsockname( ctx: &mut SyscallContext<'_, '_>, fd: c_int, addr_ptr: ForeignPtr<u8>, addr_len_ptr: ForeignPtr<socklen_t>, ) -> Result<(), Errno>

source

pub fn getpeername( ctx: &mut SyscallContext<'_, '_>, fd: c_int, addr_ptr: ForeignPtr<u8>, addr_len_ptr: ForeignPtr<socklen_t>, ) -> Result<(), Errno>

source

pub fn listen( ctx: &mut SyscallContext<'_, '_>, fd: c_int, backlog: c_int, ) -> Result<(), Errno>

source

pub fn accept( ctx: &mut SyscallContext<'_, '_>, fd: c_int, addr_ptr: ForeignPtr<u8>, addr_len_ptr: ForeignPtr<socklen_t>, ) -> Result<DescriptorHandle, SyscallError>

source

pub fn accept4( ctx: &mut SyscallContext<'_, '_>, fd: c_int, addr_ptr: ForeignPtr<u8>, addr_len_ptr: ForeignPtr<socklen_t>, flags: c_int, ) -> Result<DescriptorHandle, SyscallError>

source

pub fn connect( ctx: &mut SyscallContext<'_, '_>, fd: c_int, addr_ptr: ForeignPtr<u8>, addr_len: socklen_t, ) -> Result<(), SyscallError>

source

pub fn shutdown( ctx: &mut SyscallContext<'_, '_>, fd: c_int, how: c_uint, ) -> Result<(), SyscallError>

source

pub fn socketpair( ctx: &mut SyscallContext<'_, '_>, domain: c_int, socket_type: c_int, protocol: c_int, fd_ptr: ForeignPtr<[c_int; 2]>, ) -> Result<(), SyscallError>

source

pub fn getsockopt( ctx: &mut SyscallContext<'_, '_>, fd: c_int, level: c_int, optname: c_int, optval_ptr: ForeignPtr<()>, optlen_ptr: ForeignPtr<socklen_t>, ) -> Result<(), SyscallError>

source

pub fn setsockopt( ctx: &mut SyscallContext<'_, '_>, fd: c_int, level: c_int, optname: c_int, optval_ptr: ForeignPtr<()>, optlen: socklen_t, ) -> Result<(), SyscallError>

source§

impl SyscallHandler

source

pub fn statx(ctx: &mut SyscallContext<'_, '_>) -> SyscallResult

source

pub fn fstat( ctx: &mut SyscallContext<'_, '_>, fd: c_uint, statbuf_ptr: ForeignPtr<stat>, ) -> Result<(), SyscallError>

source

pub fn fstatfs(ctx: &mut SyscallContext<'_, '_>) -> SyscallResult

source

pub fn newfstatat(ctx: &mut SyscallContext<'_, '_>) -> SyscallResult

source§

impl SyscallHandler

source

pub fn sysinfo( ctx: &mut SyscallContext<'_, '_>, info_ptr: ForeignPtr<sysinfo>, ) -> Result<(), SyscallError>

source§

impl SyscallHandler

source

pub fn getitimer( ctx: &mut SyscallContext<'_, '_>, which: c_int, curr_value_ptr: ForeignPtr<itimerval>, ) -> Result<(), SyscallError>

source

pub fn setitimer( ctx: &mut SyscallContext<'_, '_>, which: c_int, new_value_ptr: ForeignPtr<itimerval>, old_value_ptr: ForeignPtr<itimerval>, ) -> Result<(), SyscallError>

source

pub fn alarm( ctx: &mut SyscallContext<'_, '_>, seconds: c_uint, ) -> Result<c_uint, SyscallError>

source

pub fn clock_getres( ctx: &mut SyscallContext<'_, '_>, clock_id: linux___kernel_clockid_t, res_ptr: ForeignPtr<timespec>, ) -> Result<(), SyscallError>

source

pub fn clock_nanosleep( ctx: &mut SyscallContext<'_, '_>, clock_id: linux___kernel_clockid_t, flags: c_int, request_ptr: ForeignPtr<timespec>, remain_ptr: ForeignPtr<timespec>, ) -> Result<(), SyscallError>

source

pub fn nanosleep( ctx: &mut SyscallContext<'_, '_>, req: ForeignPtr<timespec>, rem: ForeignPtr<timespec>, ) -> Result<(), SyscallError>

source§

impl SyscallHandler

source

pub fn timerfd_create( ctx: &mut SyscallContext<'_, '_>, clockid: c_int, flags: c_int, ) -> Result<DescriptorHandle, SyscallError>

source

pub fn timerfd_gettime( ctx: &mut SyscallContext<'_, '_>, fd: c_int, curr_value_ptr: ForeignPtr<itimerspec>, ) -> Result<(), SyscallError>

source

pub fn timerfd_settime( ctx: &mut SyscallContext<'_, '_>, fd: c_int, flags: c_int, new_value_ptr: ForeignPtr<itimerspec>, old_value_ptr: ForeignPtr<itimerspec>, ) -> Result<(), SyscallError>

source§

impl SyscallHandler

source

pub fn readv( ctx: &mut SyscallContext<'_, '_>, fd: c_int, iov_ptr: ForeignPtr<iovec>, iov_count: c_int, ) -> Result<ssize_t, SyscallError>

source

pub fn preadv( ctx: &mut SyscallContext<'_, '_>, fd: c_int, iov_ptr: ForeignPtr<iovec>, iov_count: c_int, offset_l: c_ulong, _offset_h: c_ulong, ) -> Result<ssize_t, SyscallError>

source

pub fn preadv2( ctx: &mut SyscallContext<'_, '_>, fd: c_int, iov_ptr: ForeignPtr<iovec>, iov_count: c_int, offset_l: c_ulong, _offset_h: c_ulong, flags: c_int, ) -> Result<ssize_t, SyscallError>

source

pub fn readv_helper( ctx: &mut SyscallContext<'_, '_>, file: &File, iovs: &[IoVec], offset: Option<off_t>, flags: c_int, ) -> Result<ssize_t, SyscallError>

source

pub fn writev( ctx: &mut SyscallContext<'_, '_>, fd: c_int, iov_ptr: ForeignPtr<iovec>, iov_count: c_int, ) -> Result<ssize_t, SyscallError>

source

pub fn pwritev( ctx: &mut SyscallContext<'_, '_>, fd: c_int, iov_ptr: ForeignPtr<iovec>, iov_count: c_int, offset_l: c_ulong, _offset_h: c_ulong, ) -> Result<ssize_t, SyscallError>

source

pub fn pwritev2( ctx: &mut SyscallContext<'_, '_>, fd: c_int, iov_ptr: ForeignPtr<iovec>, iov_count: c_int, offset_l: c_ulong, _offset_h: c_ulong, flags: c_int, ) -> Result<ssize_t, SyscallError>

source

pub fn writev_helper( ctx: &mut SyscallContext<'_, '_>, file: &File, iovs: &[IoVec], offset: Option<off_t>, flags: c_int, ) -> Result<ssize_t, SyscallError>

source§

impl SyscallHandler

source

pub fn close( ctx: &mut SyscallContext<'_, '_>, fd: c_int, ) -> Result<(), SyscallError>

source

pub fn dup( ctx: &mut SyscallContext<'_, '_>, fd: c_int, ) -> Result<DescriptorHandle, SyscallError>

source

pub fn dup2( ctx: &mut SyscallContext<'_, '_>, old_fd: c_int, new_fd: c_int, ) -> Result<DescriptorHandle, SyscallError>

source

pub fn dup3( ctx: &mut SyscallContext<'_, '_>, old_fd: c_int, new_fd: c_int, flags: c_int, ) -> Result<DescriptorHandle, SyscallError>

source

pub fn read( ctx: &mut SyscallContext<'_, '_>, fd: c_int, buf_ptr: ForeignPtr<u8>, buf_size: usize, ) -> Result<isize, SyscallError>

source

pub fn pread64( ctx: &mut SyscallContext<'_, '_>, fd: c_int, buf_ptr: ForeignPtr<u8>, buf_size: usize, offset: kernel_off_t, ) -> Result<isize, SyscallError>

source

pub fn write( ctx: &mut SyscallContext<'_, '_>, fd: c_int, buf_ptr: ForeignPtr<u8>, buf_size: usize, ) -> Result<isize, SyscallError>

source

pub fn pwrite64( ctx: &mut SyscallContext<'_, '_>, fd: c_int, buf_ptr: ForeignPtr<u8>, buf_size: usize, offset: kernel_off_t, ) -> Result<isize, SyscallError>

source

pub fn pipe( ctx: &mut SyscallContext<'_, '_>, fd_ptr: ForeignPtr<[c_int; 2]>, ) -> Result<(), SyscallError>

source

pub fn pipe2( ctx: &mut SyscallContext<'_, '_>, fd_ptr: ForeignPtr<[c_int; 2]>, flags: c_int, ) -> Result<(), SyscallError>

source

pub fn getpid( ctx: &mut SyscallContext<'_, '_>, ) -> Result<kernel_pid_t, SyscallError>

source

pub fn getppid( ctx: &mut SyscallContext<'_, '_>, ) -> Result<kernel_pid_t, SyscallError>

source

pub fn getpgrp( ctx: &mut SyscallContext<'_, '_>, ) -> Result<kernel_pid_t, SyscallError>

source

pub fn getpgid( ctx: &mut SyscallContext<'_, '_>, pid: kernel_pid_t, ) -> Result<kernel_pid_t, SyscallError>

source

pub fn setpgid( ctx: &mut SyscallContext<'_, '_>, pid: kernel_pid_t, pgid: kernel_pid_t, ) -> Result<(), SyscallError>

source

pub fn getsid( ctx: &mut SyscallContext<'_, '_>, pid: kernel_pid_t, ) -> Result<kernel_pid_t, SyscallError>

source

pub fn setsid( ctx: &mut SyscallContext<'_, '_>, ) -> Result<kernel_pid_t, SyscallError>

source

pub fn execve( ctx: &mut SyscallContext<'_, '_>, pathname: ForeignPtr<c_char>, argv: ForeignPtr<ForeignPtr<c_char>>, envp: ForeignPtr<ForeignPtr<c_char>>, ) -> Result<i64, SyscallError>

source

pub fn execveat( _ctx: &mut SyscallContext<'_, '_>, _dirfd: c_int, _pathname: ForeignPtr<c_char>, _argv: ForeignPtr<ForeignPtr<c_char>>, _envp: ForeignPtr<ForeignPtr<c_char>>, _flags: c_int, ) -> Result<i64, SyscallError>

source

pub fn exit_group( _ctx: &mut SyscallContext<'_, '_>, error_code: c_int, ) -> Result<(), SyscallError>

source

pub fn set_tid_address( ctx: &mut SyscallContext<'_, '_>, tid_ptr: ForeignPtr<c_int>, ) -> Result<kernel_pid_t, SyscallError>

source

pub fn uname( ctx: &mut SyscallContext<'_, '_>, name_ptr: ForeignPtr<new_utsname>, ) -> Result<(), SyscallError>

source

pub fn chdir( ctx: &mut SyscallContext<'_, '_>, path: ForeignPtr<c_char>, ) -> Result<(), SyscallError>

source§

impl SyscallHandler

source

pub fn wait4( ctx: &mut SyscallContext<'_, '_>, pid: kernel_pid_t, status: ForeignPtr<c_int>, options: c_int, usage: ForeignPtr<rusage>, ) -> Result<kernel_pid_t, SyscallError>

source

pub fn waitid( ctx: &mut SyscallContext<'_, '_>, which: c_int, upid: kernel_pid_t, infop: ForeignPtr<siginfo_t>, options: c_int, uru: ForeignPtr<rusage>, ) -> Result<(), SyscallError>

source§

impl SyscallHandler

source

pub fn new( host_id: HostId, process_id: ProcessId, thread_id: ThreadId, count_syscalls: bool, ) -> SyscallHandler

source

pub fn syscall( &mut self, ctx: &ThreadContext<'_>, args: &SyscallArgs, ) -> SyscallResult

source

pub fn is_blocked(&self) -> bool

Did the last syscall result in SyscallError::Blocked? If called from a syscall handler and is_blocked() returns true, then the current syscall is the same syscall that previously blocked. For example, if currently running the connect syscall handler and is_blocked() is true, then the previous syscall handler that ran was also connect and it returned SyscallError::Blocked.

Trait Implementations§

source§

impl Drop for SyscallHandler

source§

fn drop(&mut self)

Executes the destructor for this type. Read more

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> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
source§

impl<T> NoTypeInference for T

source§

type This = T

source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
source§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
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.
source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V