With SysnoSet, we can create a bitset of syscalls at compile time. Having predefined sets for various groups of related syscalls is useful for constructing seccomp filters. strace for example, categorizes syscalls in their syscall tables.
We could have SysnoSets for:
The great thing about using a bitset for these is that they can be easily manipulated with set operations (e.g., union, intersection, difference).
These syscall sets should probably be behind a feature flag to avoid slowing down compilation for crates that only need basic functionality.
See also:
With
SysnoSet, we can create a bitset of syscalls at compile time. Having predefined sets for various groups of related syscalls is useful for constructing seccomp filters. strace for example, categorizes syscalls in their syscall tables.We could have
SysnoSets for:getpid,gettid).The great thing about using a bitset for these is that they can be easily manipulated with set operations (e.g., union, intersection, difference).
These syscall sets should probably be behind a feature flag to avoid slowing down compilation for crates that only need basic functionality.
See also: