pub struct Threads { /* private fields */ }Expand description
Allows clone and sleep syscalls, which allow creating new threads and processes, and
pausing them.
§Security
This is in the danger zone not because it’s dangerous but because it can be misused: Threads do not provide isolation from each other. You can still access other threads’ memory and potentially get them to do operations that are not allowed in the current thread’s seccomp context.
Implementations§
Source§impl Threads
impl Threads
Sourcepub fn allow_create(self) -> Threads
pub fn allow_create(self) -> Threads
Allow creating new threads and processes.
Sourcepub fn allow_sleep(self) -> YesReally<Threads>
pub fn allow_sleep(self) -> YesReally<Threads>
Allow sleeping on the current thread
§Security considerations
An attacker with arbitrary code execution and access to a high resolution timer can mount timing attacks (e.g. spectre).
Trait Implementations§
Source§impl RuleSet for Threads
impl RuleSet for Threads
Source§fn simple_rules(&self) -> Vec<Sysno>
fn simple_rules(&self) -> Vec<Sysno>
A simple rule is a seccomp rule that just allows the syscall without restriction.
Source§fn conditional_rules(&self) -> HashMap<Sysno, Vec<SeccompRule>>
fn conditional_rules(&self) -> HashMap<Sysno, Vec<SeccompRule>>
A conditional rule is a seccomp rule that uses a condition to restrict the syscall, e.g. only
specific flags as parameters.
Auto Trait Implementations§
impl Freeze for Threads
impl RefUnwindSafe for Threads
impl Send for Threads
impl Sync for Threads
impl Unpin for Threads
impl UnwindSafe for Threads
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