Trait kernel::platform::platform::SyscallFilter

source ·
pub trait SyscallFilter {
    // Provided method
    fn filter_syscall(
        &self,
        _process: &dyn Process,
        _syscall: &Syscall,
    ) -> Result<(), ErrorCode> { ... }
}
Expand description

Trait for implementing system call filters that the kernel uses to decide whether to handle a specific system call or not.

Provided Methods§

source

fn filter_syscall( &self, _process: &dyn Process, _syscall: &Syscall, ) -> Result<(), ErrorCode>

Check the platform-provided system call filter for all non-yield system calls. If the system call is allowed for the provided process then return Ok(()). Otherwise, return Err() with an ErrorCode that will be returned to the calling application. The default implementation allows all system calls.

This API should be considered unstable, and is likely to change in the future.

Implementations on Foreign Types§

source§

impl SyscallFilter for ()

Implement default allow all SyscallFilter trait for unit.

Implementors§

source§

impl SyscallFilter for TbfHeaderFilterDefaultAllow

Implement default SyscallFilter trait for filtering based on the TBF header.