Skip to main content

Module sys

Module sys 

Source
Expand description

Raw kernel ABI not covered (or not covered stably) by the libc crate: the seccomp user-notification structures and ioctls, plus small helpers.

Layouts are the x86_64 ones from linux/seccomp.h; they were checked against the C compiler before being written down here.

Structs§

SeccompData
Mirror of struct seccomp_data.
SeccompNotif
Mirror of struct seccomp_notif (80 bytes).
SeccompNotifAddfd
Mirror of struct seccomp_notif_addfd (24 bytes).
SeccompNotifResp
Mirror of struct seccomp_notif_resp (24 bytes).

Constants§

AUDIT_ARCH_AARCH64
AUDIT_ARCH_ARM
AUDIT_ARCH_I386
AUDIT_ARCH_X86_64
PATH_MAX
Maximum path length we read out of a tracee.
RED_ZONE_SIZE
Bytes a 64-bit ABI guarantees below the stack pointer (the red zone).
SECCOMP_ADDFD_FLAG_SEND
SECCOMP_ADDFD_FLAG_SETFD
SECCOMP_FILTER_FLAG_NEW_LISTENER
SECCOMP_IOCTL_NOTIF_ADDFD
SECCOMP_IOCTL_NOTIF_ID_VALID
SECCOMP_IOCTL_NOTIF_RECV
SECCOMP_IOCTL_NOTIF_SEND
SECCOMP_RET_ALLOW
SECCOMP_RET_ERRNO
SECCOMP_RET_TRACE
SECCOMP_RET_USER_NOTIF
SECCOMP_SET_MODE_FILTER
SECCOMP_USER_NOTIF_FLAG_CONTINUE

Functions§

check
Converts a raw syscall return value into a Result.
errno
Returns the calling thread’s current errno.
strerror
Formats an errno for log messages.

Type Aliases§

Errno
errno-style error: a positive errno value.
Result
Result alias used throughout the crate.