pub struct SyscallHandler { /* private fields */ }
Implementations§
source§impl SyscallHandler
impl SyscallHandler
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>
pub fn clone3( ctx: &mut SyscallContext<'_, '_>, args: ForeignPtr<clone_args>, args_size: usize, ) -> Result<kernel_pid_t, Errno>
pub fn fork(ctx: &mut SyscallContext<'_, '_>) -> Result<kernel_pid_t, Errno>
pub fn vfork(ctx: &mut SyscallContext<'_, '_>) -> Result<kernel_pid_t, Errno>
pub fn gettid(ctx: &mut SyscallContext<'_, '_>) -> Result<kernel_pid_t, Errno>
pub fn capget( ctx: &mut SyscallContext<'_, '_>, hdrp: ForeignPtr<user_cap_header>, datap: ForeignPtr<[user_cap_data; 2]>, ) -> Result<(), Errno>
pub fn capset( ctx: &mut SyscallContext<'_, '_>, hdrp: ForeignPtr<user_cap_header>, datap: ForeignPtr<[user_cap_data; 2]>, ) -> Result<(), Errno>
source§impl SyscallHandler
impl SyscallHandler
pub fn close_range( ctx: &mut SyscallContext<'_, '_>, first: c_uint, last: c_uint, flags: c_uint, ) -> Result<(), Errno>
source§impl SyscallHandler
impl SyscallHandler
pub fn epoll_create( ctx: &mut SyscallContext<'_, '_>, size: c_int, ) -> Result<DescriptorHandle, Errno>
pub fn epoll_create1( ctx: &mut SyscallContext<'_, '_>, flags: c_int, ) -> Result<DescriptorHandle, Errno>
pub fn epoll_ctl( ctx: &mut SyscallContext<'_, '_>, epfd: c_int, op: c_int, fd: c_int, event_ptr: ForeignPtr<epoll_event>, ) -> Result<(), Errno>
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>
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>
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
impl SyscallHandler
pub fn eventfd( ctx: &mut SyscallContext<'_, '_>, init_val: c_uint, ) -> Result<DescriptorHandle, Errno>
pub fn eventfd2( ctx: &mut SyscallContext<'_, '_>, init_val: c_uint, flags: c_int, ) -> Result<DescriptorHandle, Errno>
source§impl SyscallHandler
impl SyscallHandler
pub fn fcntl( ctx: &mut SyscallContext<'_, '_>, fd: c_uint, cmd: c_uint, arg: c_ulong, ) -> Result<c_long, SyscallError>
source§impl SyscallHandler
impl SyscallHandler
pub fn open( ctx: &mut SyscallContext<'_, '_>, _path: ForeignPtr<()>, _flags: c_int, _mode: kernel_mode_t, ) -> SyscallResult
pub fn creat(ctx: &mut SyscallContext<'_, '_>) -> SyscallResult
pub fn fadvise64(ctx: &mut SyscallContext<'_, '_>) -> SyscallResult
pub fn fallocate(ctx: &mut SyscallContext<'_, '_>) -> SyscallResult
pub fn fchmod(ctx: &mut SyscallContext<'_, '_>) -> SyscallResult
pub fn fchown(ctx: &mut SyscallContext<'_, '_>) -> SyscallResult
pub fn fdatasync(ctx: &mut SyscallContext<'_, '_>) -> SyscallResult
pub fn fgetxattr(ctx: &mut SyscallContext<'_, '_>) -> SyscallResult
pub fn flistxattr(ctx: &mut SyscallContext<'_, '_>) -> SyscallResult
pub fn flock(ctx: &mut SyscallContext<'_, '_>) -> SyscallResult
pub fn fremovexattr(ctx: &mut SyscallContext<'_, '_>) -> SyscallResult
pub fn fsetxattr(ctx: &mut SyscallContext<'_, '_>) -> SyscallResult
pub fn fsync(ctx: &mut SyscallContext<'_, '_>) -> SyscallResult
pub fn ftruncate(ctx: &mut SyscallContext<'_, '_>) -> SyscallResult
pub fn getdents(ctx: &mut SyscallContext<'_, '_>) -> SyscallResult
pub fn getdents64(ctx: &mut SyscallContext<'_, '_>) -> SyscallResult
pub fn lseek( ctx: &mut SyscallContext<'_, '_>, fd: c_uint, _offset: kernel_off_t, _whence: c_uint, ) -> Result<kernel_off_t, SyscallError>
pub fn readahead(ctx: &mut SyscallContext<'_, '_>) -> SyscallResult
pub fn sync_file_range(ctx: &mut SyscallContext<'_, '_>) -> SyscallResult
pub fn syncfs(ctx: &mut SyscallContext<'_, '_>) -> SyscallResult
source§impl SyscallHandler
impl SyscallHandler
pub fn openat( ctx: &mut SyscallContext<'_, '_>, _dir_fd: c_int, _path: ForeignPtr<()>, _flags: c_int, _mode: kernel_mode_t, ) -> SyscallResult
pub fn faccessat(ctx: &mut SyscallContext<'_, '_>) -> SyscallResult
pub fn fchmodat(ctx: &mut SyscallContext<'_, '_>) -> SyscallResult
pub fn fchmodat2(ctx: &mut SyscallContext<'_, '_>) -> SyscallResult
pub fn fchownat(ctx: &mut SyscallContext<'_, '_>) -> SyscallResult
pub fn futimesat(ctx: &mut SyscallContext<'_, '_>) -> SyscallResult
pub fn linkat(ctx: &mut SyscallContext<'_, '_>) -> SyscallResult
pub fn mkdirat(ctx: &mut SyscallContext<'_, '_>) -> SyscallResult
pub fn mknodat(ctx: &mut SyscallContext<'_, '_>) -> SyscallResult
pub fn readlinkat(ctx: &mut SyscallContext<'_, '_>) -> SyscallResult
pub fn renameat(ctx: &mut SyscallContext<'_, '_>) -> SyscallResult
pub fn renameat2(ctx: &mut SyscallContext<'_, '_>) -> SyscallResult
pub fn symlinkat(ctx: &mut SyscallContext<'_, '_>) -> SyscallResult
pub fn unlinkat(ctx: &mut SyscallContext<'_, '_>) -> SyscallResult
pub fn utimensat(ctx: &mut SyscallContext<'_, '_>) -> SyscallResult
source§impl SyscallHandler
impl SyscallHandler
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>
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>
pub fn set_robust_list( _ctx: &mut SyscallContext<'_, '_>, _head: ForeignPtr<robust_list_head>, _len: size_t, ) -> Result<(), Errno>
source§impl SyscallHandler
impl SyscallHandler
pub fn ioctl( ctx: &mut SyscallContext<'_, '_>, fd: c_uint, cmd: c_uint, arg_ptr: ForeignPtr<()>, ) -> SyscallResult
source§impl SyscallHandler
impl SyscallHandler
pub fn brk( ctx: &mut SyscallContext<'_, '_>, addr: ForeignPtr<u8>, ) -> Result<ForeignPtr<u8>, SyscallError>
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>
pub fn munmap( ctx: &mut SyscallContext<'_, '_>, addr: c_ulong, len: usize, ) -> Result<(), SyscallError>
pub fn mprotect( ctx: &mut SyscallContext<'_, '_>, addr: c_ulong, len: usize, prot: c_ulong, ) -> Result<(), SyscallError>
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
impl SyscallHandler
pub fn poll( ctx: &mut SyscallContext<'_, '_>, _ufds: ForeignPtr<pollfd>, _nfds: c_uint, _timeout_msecs: c_int, ) -> Result<c_int, SyscallError>
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
impl SyscallHandler
pub fn getrandom( ctx: &mut SyscallContext<'_, '_>, buf_ptr: ForeignPtr<u8>, count: usize, _flags: c_uint, ) -> Result<isize, Errno>
source§impl SyscallHandler
impl SyscallHandler
pub fn prlimit64( _ctx: &mut SyscallContext<'_, '_>, pid: kernel_pid_t, resource: c_uint, _new_rlim: ForeignPtr<()>, _old_rlim: ForeignPtr<()>, ) -> Result<(), SyscallError>
source§impl SyscallHandler
impl SyscallHandler
pub fn sched_getaffinity( ctx: &mut SyscallContext<'_, '_>, tid: kernel_pid_t, cpusetsize: usize, mask_ptr: ForeignPtr<c_ulong>, ) -> Result<c_int, Errno>
pub fn sched_setaffinity( ctx: &mut SyscallContext<'_, '_>, tid: kernel_pid_t, cpusetsize: usize, mask_ptr: ForeignPtr<c_ulong>, ) -> Result<(), Errno>
pub fn rseq( ctx: &mut SyscallContext<'_, '_>, rseq_ptr: ForeignPtr<MaybeUninit<u8>>, rseq_len: u32, flags: c_int, _sig: u32, ) -> Result<(), Errno>
source§impl SyscallHandler
impl SyscallHandler
pub fn select( ctx: &mut SyscallContext<'_, '_>, _n: c_int, _inp: ForeignPtr<kernel_fd_set>, _outp: ForeignPtr<kernel_fd_set>, _exp: ForeignPtr<kernel_fd_set>, _tvp: ForeignPtr<kernel_old_timeval>, ) -> Result<c_int, SyscallError>
pub fn pselect6( ctx: &mut SyscallContext<'_, '_>, _n: c_int, _inp: ForeignPtr<kernel_fd_set>, _outp: ForeignPtr<kernel_fd_set>, _exp: ForeignPtr<kernel_fd_set>, _tsp: ForeignPtr<kernel_timespec>, _sig: ForeignPtr<()>, ) -> Result<c_int, SyscallError>
source§impl SyscallHandler
impl SyscallHandler
pub fn shadow_yield(_ctx: &mut SyscallContext<'_, '_>) -> Result<(), Errno>
pub fn shadow_init_memory_manager( ctx: &mut SyscallContext<'_, '_>, ) -> Result<(), Errno>
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
impl SyscallHandler
pub fn kill( ctx: &mut SyscallContext<'_, '_>, pid: kernel_pid_t, sig: c_int, ) -> Result<(), Errno>
pub fn tkill( ctx: &mut SyscallContext<'_, '_>, tid: kernel_pid_t, sig: c_int, ) -> Result<(), Errno>
pub fn tgkill( ctx: &mut SyscallContext<'_, '_>, tgid: kernel_pid_t, tid: kernel_pid_t, sig: c_int, ) -> Result<(), Errno>
pub fn rt_sigaction( ctx: &mut SyscallContext<'_, '_>, _sig: c_int, _act: ForeignPtr<sigaction>, _oact: ForeignPtr<sigaction>, _sigsetsize: size_t, ) -> Result<(), SyscallError>
pub fn rt_sigprocmask( ctx: &mut SyscallContext<'_, '_>, _how: c_int, _nset: ForeignPtr<sigset_t>, _oset: ForeignPtr<sigset_t>, _sigsetsize: size_t, ) -> Result<(), SyscallError>
pub fn sigaltstack( ctx: &mut SyscallContext<'_, '_>, _uss: ForeignPtr<stack_t>, _uoss: ForeignPtr<stack_t>, ) -> Result<(), SyscallError>
source§impl SyscallHandler
impl SyscallHandler
pub fn socket( ctx: &mut SyscallContext<'_, '_>, domain: c_int, socket_type: c_int, protocol: c_int, ) -> Result<DescriptorHandle, Errno>
pub fn bind( ctx: &mut SyscallContext<'_, '_>, fd: c_int, addr_ptr: ForeignPtr<u8>, addr_len: socklen_t, ) -> Result<(), SyscallError>
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>
pub fn sendmsg( ctx: &mut SyscallContext<'_, '_>, fd: c_int, msg_ptr: ForeignPtr<msghdr>, flags: c_int, ) -> Result<ssize_t, SyscallError>
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>
pub fn recvmsg( ctx: &mut SyscallContext<'_, '_>, fd: c_int, msg_ptr: ForeignPtr<msghdr>, flags: c_int, ) -> Result<ssize_t, SyscallError>
pub fn getsockname( ctx: &mut SyscallContext<'_, '_>, fd: c_int, addr_ptr: ForeignPtr<u8>, addr_len_ptr: ForeignPtr<socklen_t>, ) -> Result<(), Errno>
pub fn getpeername( ctx: &mut SyscallContext<'_, '_>, fd: c_int, addr_ptr: ForeignPtr<u8>, addr_len_ptr: ForeignPtr<socklen_t>, ) -> Result<(), Errno>
pub fn listen( ctx: &mut SyscallContext<'_, '_>, fd: c_int, backlog: c_int, ) -> Result<(), Errno>
pub fn accept( ctx: &mut SyscallContext<'_, '_>, fd: c_int, addr_ptr: ForeignPtr<u8>, addr_len_ptr: ForeignPtr<socklen_t>, ) -> Result<DescriptorHandle, SyscallError>
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>
pub fn connect( ctx: &mut SyscallContext<'_, '_>, fd: c_int, addr_ptr: ForeignPtr<u8>, addr_len: socklen_t, ) -> Result<(), SyscallError>
pub fn shutdown( ctx: &mut SyscallContext<'_, '_>, fd: c_int, how: c_uint, ) -> Result<(), SyscallError>
pub fn socketpair( ctx: &mut SyscallContext<'_, '_>, domain: c_int, socket_type: c_int, protocol: c_int, fd_ptr: ForeignPtr<[c_int; 2]>, ) -> Result<(), SyscallError>
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>
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
impl SyscallHandler
pub fn statx(ctx: &mut SyscallContext<'_, '_>) -> SyscallResult
pub fn fstat( ctx: &mut SyscallContext<'_, '_>, fd: c_uint, statbuf_ptr: ForeignPtr<stat>, ) -> Result<(), SyscallError>
pub fn fstatfs(ctx: &mut SyscallContext<'_, '_>) -> SyscallResult
pub fn newfstatat(ctx: &mut SyscallContext<'_, '_>) -> SyscallResult
source§impl SyscallHandler
impl SyscallHandler
pub fn sysinfo( ctx: &mut SyscallContext<'_, '_>, info_ptr: ForeignPtr<sysinfo>, ) -> Result<(), SyscallError>
source§impl SyscallHandler
impl SyscallHandler
pub fn getitimer( ctx: &mut SyscallContext<'_, '_>, which: c_int, curr_value_ptr: ForeignPtr<itimerval>, ) -> Result<(), SyscallError>
pub fn setitimer( ctx: &mut SyscallContext<'_, '_>, which: c_int, new_value_ptr: ForeignPtr<itimerval>, old_value_ptr: ForeignPtr<itimerval>, ) -> Result<(), SyscallError>
pub fn alarm( ctx: &mut SyscallContext<'_, '_>, seconds: c_uint, ) -> Result<c_uint, SyscallError>
pub fn clock_getres( ctx: &mut SyscallContext<'_, '_>, clock_id: linux___kernel_clockid_t, res_ptr: ForeignPtr<timespec>, ) -> Result<(), SyscallError>
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>
pub fn nanosleep( ctx: &mut SyscallContext<'_, '_>, req: ForeignPtr<timespec>, rem: ForeignPtr<timespec>, ) -> Result<(), SyscallError>
source§impl SyscallHandler
impl SyscallHandler
pub fn timerfd_create( ctx: &mut SyscallContext<'_, '_>, clockid: c_int, flags: c_int, ) -> Result<DescriptorHandle, SyscallError>
pub fn timerfd_gettime( ctx: &mut SyscallContext<'_, '_>, fd: c_int, curr_value_ptr: ForeignPtr<itimerspec>, ) -> Result<(), SyscallError>
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
impl SyscallHandler
pub fn readv( ctx: &mut SyscallContext<'_, '_>, fd: c_int, iov_ptr: ForeignPtr<iovec>, iov_count: c_int, ) -> Result<ssize_t, SyscallError>
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>
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>
pub fn readv_helper( ctx: &mut SyscallContext<'_, '_>, file: &File, iovs: &[IoVec], offset: Option<off_t>, flags: c_int, ) -> Result<ssize_t, SyscallError>
pub fn writev( ctx: &mut SyscallContext<'_, '_>, fd: c_int, iov_ptr: ForeignPtr<iovec>, iov_count: c_int, ) -> Result<ssize_t, SyscallError>
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>
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>
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
impl SyscallHandler
pub fn close( ctx: &mut SyscallContext<'_, '_>, fd: c_int, ) -> Result<(), SyscallError>
pub fn dup( ctx: &mut SyscallContext<'_, '_>, fd: c_int, ) -> Result<DescriptorHandle, SyscallError>
pub fn dup2( ctx: &mut SyscallContext<'_, '_>, old_fd: c_int, new_fd: c_int, ) -> Result<DescriptorHandle, SyscallError>
pub fn dup3( ctx: &mut SyscallContext<'_, '_>, old_fd: c_int, new_fd: c_int, flags: c_int, ) -> Result<DescriptorHandle, SyscallError>
pub fn read( ctx: &mut SyscallContext<'_, '_>, fd: c_int, buf_ptr: ForeignPtr<u8>, buf_size: usize, ) -> Result<isize, SyscallError>
pub fn pread64( ctx: &mut SyscallContext<'_, '_>, fd: c_int, buf_ptr: ForeignPtr<u8>, buf_size: usize, offset: kernel_off_t, ) -> Result<isize, SyscallError>
pub fn write( ctx: &mut SyscallContext<'_, '_>, fd: c_int, buf_ptr: ForeignPtr<u8>, buf_size: usize, ) -> Result<isize, SyscallError>
pub fn pwrite64( ctx: &mut SyscallContext<'_, '_>, fd: c_int, buf_ptr: ForeignPtr<u8>, buf_size: usize, offset: kernel_off_t, ) -> Result<isize, SyscallError>
pub fn pipe( ctx: &mut SyscallContext<'_, '_>, fd_ptr: ForeignPtr<[c_int; 2]>, ) -> Result<(), SyscallError>
pub fn pipe2( ctx: &mut SyscallContext<'_, '_>, fd_ptr: ForeignPtr<[c_int; 2]>, flags: c_int, ) -> Result<(), SyscallError>
pub fn getpid( ctx: &mut SyscallContext<'_, '_>, ) -> Result<kernel_pid_t, SyscallError>
pub fn getppid( ctx: &mut SyscallContext<'_, '_>, ) -> Result<kernel_pid_t, SyscallError>
pub fn getpgrp( ctx: &mut SyscallContext<'_, '_>, ) -> Result<kernel_pid_t, SyscallError>
pub fn getpgid( ctx: &mut SyscallContext<'_, '_>, pid: kernel_pid_t, ) -> Result<kernel_pid_t, SyscallError>
pub fn setpgid( ctx: &mut SyscallContext<'_, '_>, pid: kernel_pid_t, pgid: kernel_pid_t, ) -> Result<(), SyscallError>
pub fn getsid( ctx: &mut SyscallContext<'_, '_>, pid: kernel_pid_t, ) -> Result<kernel_pid_t, SyscallError>
pub fn setsid( ctx: &mut SyscallContext<'_, '_>, ) -> Result<kernel_pid_t, SyscallError>
pub fn execve( ctx: &mut SyscallContext<'_, '_>, pathname: ForeignPtr<c_char>, argv: ForeignPtr<ForeignPtr<c_char>>, envp: ForeignPtr<ForeignPtr<c_char>>, ) -> Result<i64, SyscallError>
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>
pub fn exit_group( _ctx: &mut SyscallContext<'_, '_>, error_code: c_int, ) -> Result<(), SyscallError>
pub fn set_tid_address( ctx: &mut SyscallContext<'_, '_>, tid_ptr: ForeignPtr<c_int>, ) -> Result<kernel_pid_t, SyscallError>
pub fn uname( ctx: &mut SyscallContext<'_, '_>, name_ptr: ForeignPtr<new_utsname>, ) -> Result<(), SyscallError>
pub fn chdir( ctx: &mut SyscallContext<'_, '_>, path: ForeignPtr<c_char>, ) -> Result<(), SyscallError>
source§impl SyscallHandler
impl SyscallHandler
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>
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
impl SyscallHandler
pub fn new( host_id: HostId, process_id: ProcessId, thread_id: ThreadId, count_syscalls: bool, ) -> SyscallHandler
pub fn syscall( &mut self, ctx: &ThreadContext<'_>, args: &SyscallArgs, ) -> SyscallResult
sourcepub fn is_blocked(&self) -> bool
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§
Auto Trait Implementations§
impl Freeze for SyscallHandler
impl RefUnwindSafe for SyscallHandler
impl Send for SyscallHandler
impl !Sync for SyscallHandler
impl Unpin for SyscallHandler
impl UnwindSafe for SyscallHandler
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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