Skip to content

Add predefined sets of syscalls #20

@jasonwhite

Description

@jasonwhite

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:

  • All syscalls that create file descriptors.
  • All syscalls that take file descriptors as parameters.
  • All network related syscalls.
  • All memory related syscalls.
  • All state-related syscalls.
  • All signal-related syscalls.
  • All syscalls that never fail (e.g., getpid, gettid).
  • All process-related syscalls.

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:

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions