Module task

Module task 

Source

Re-exports§

pub use limits::*;
pub use waiter::*;

Modules§

container_namespace
dynamic_thread_spawner
The API for spawning dynamic kernel threads.
limits
net
syscalls
tracing
waiter

Structs§

AbstractSocketNamespace
A registry of abstract sockets.
ArgNameAndValue
Kernel command line argument structure
AtomicTaskFlags
CapturedThreadState
This contains thread state that tracers can inspect and modify. It is captured when a thread stops, and optionally copied back (if dirty) when a thread starts again. An alternative implementation would involve the tracers acting on thread state directly; however, this would involve sharing CurrentTask structures across multiple threads, which goes against the intent of the design of CurrentTask.
Cgroup
Cgroup is a non-root cgroup in a cgroup hierarchy, and can have other Cgroups as children.
CgroupFreezerState
CgroupPidTable
CgroupPidTable contains the mapping of ThreadGroup (by pid) to non-root cgroup. If pid is valid but does not exist in the mapping, then it is assumed to be in the root cgroup.
CgroupRoot
CgroupRoot is the root of the cgroup hierarchy. The root cgroup is different from the rest of the cgroups in a cgroup hierarchy (sub-cgroups of the root) in a few ways:
ControllingTerminal
The controlling terminal of a session.
CredentialsReadGuard
Guard for reading locked credentials.
CredentialsWriteGuard
Guard for writing credentials. No CredentialsReadGuard to the same task can concurrently exist.
CurrentTask
The task object associated with the currently executing thread.
DeferredZombiePTracer
Child process that have exited, but the zombie ptrace needs to be consumed before they can be waited for.
DelayedReleaser
Service to handle delayed releases.
FullCredentials
Task permission are determined from their credentials, and if enabled, from their SEStarnix security state.
GrantedSyslog
HwCap
Hardware capabilities.
HwCaps
Hardware capabilities for both 32-bit and 64-bit ELF binaries.
IpTables
Stores [IpTable]s associated with each protocol.
Kernel
The shared, mutable state for the entire Starnix kernel.
KernelCgroups
All cgroups of the kernel. There is a single cgroup v2 hierarchy, and one-or-more cgroup v1 hierarchies. TODO(https://fxbug.dev/389748287): Add cgroup v1 hierarchies on the kernel.
KernelFeatures
KernelStats
KernelThreads
The threads that the kernel runs internally.
LockedAndTask
LogSubscription
NormalPriority
The task normal priority, used for favoring or disfavoring a task running with some non-real-time scheduling policies. Ranges from -20 to +19 in “user-space” representation and +1 to +40 in “kernel-internal” representation. See “The nice value” at sched(7) for full specification.
PageFaultExceptionReport
The decoded cross-platform parts we care about for page fault exception reports.
PidTable
ProcessExitInfo
ProcessGroup
ProcessGroupMutableState
RobustList
RobustListHead
RoleOverrides
Per-container overrides for thread roles.
RoleOverridesBuilder
Builder for RoleOverrides.
SchedulerManager
SchedulerState
SeccompData
SeccompFilter
SeccompFilterContainer
A list of seccomp filters, intended to be associated with a specific process.
SeccompFilterResult
The result of running a set of seccomp filters.
SeccompNotifier
The underlying implementation of the file descriptor that connects a process that triggers a SECCOMP_RET_USER_NOTIF with the monitoring process. This support seccomp’s ability to notify a user-space process on specific syscall triggers. See seccomp_unotify(2) for the semantics.
SeccompState
Per-process state that cannot be stored in the container (e.g., whether there is a container).
Session
A session is a collection of ProcessGroup objects that are related to each other. Each session has a session ID (sid), which is a unique identifier for the session.
SessionMutableState
Syslog
Task
A unit of execution.
TaskBuilder
TaskContainer
Container around a weak task and a strong TaskPersistentInfo. It is needed to keep the information even when the task is not upgradable, because when the task is dropped, there is a moment where the task is not yet released, yet the weak pointer is not upgradeable anymore. During this time, it is still necessary to access the persistent info to compute the state of the thread for the different wait syscalls.
TaskFlags
TaskMutableState
TaskPersistentInfoState
The information of the task that needs to be available to the ThreadGroup while computing which process a wait can target. It is necessary to shared this data with the ThreadGroup so that it is available while the task is being dropped and so is not accessible from a weak pointer.
ThreadGroup
A collection of Task objects that roughly correspond to a “process”.
ThreadGroupKey
A weak reference to a thread group that can be used in set and maps.
ThreadGroupMutableState
The mutable state of the ThreadGroup.
ThreadGroupParent
A wrapper around a Weak<ThreadGroup> that expects the underlying Weak to always be valid. The wrapper will check this at runtime during creation and upgrade.
ThreadState
The thread related information of a CurrentTask. The information should never be used outside of the thread owning the CurrentTask.
UtsNamespace
WaitResult
ZombieProcess

Enums§

CurrentCreds
Represents the current state of the task’s subjective credentials.
ExceptionResult
ExitStatus
FreezerState
KmsgLevel
ProcessEntryRef
ProcessSelector
A selector that can match a process. Works as a representation of the pid argument to syscalls like wait and kill.
SeccompAction
SeccompStateValue
Possible values for the current status of the seccomp filters for this process.
SyslogAccess
TaskStateCode
ThreadGroupLifecycleWaitValue
Values used for waiting on the ThreadGroup lifecycle wait queue.
WaitableChildResult

Traits§

CgroupOps
Common operations of all cgroups.
CurrentTaskAndLockedReleasable
An object-safe/dyn-compatible trait to wrap Releasable types.
KernelOrTask
An object that can be either a Kernel or a CurrentTask.

Functions§

max_priority_for_sched_policy
min_priority_for_sched_policy
parse_cmdline
path_from_root
Returns the path from the root to this cgroup.
register_delayed_release
Register the container to be deferred released.
with_new_current_task
Create a new system task, register it on the thread and run the given closure with it.

Type Aliases§

AbstractUnixSocketNamespace
AbstractVsockSocketNamespace
CgroupHandle
CurrentTaskAndLocked
ProcessGroupReadGuard
ProcessGroupStateMutRef
ProcessGroupStateRef
ProcessGroupWriteGuard
RobustListHeadPtr
RobustListPtr
SeccompNotifierHandle
SessionReadGuard
SessionStateMutRef
SessionStateRef
SessionWriteGuard
TaskPersistentInfo
TaskReadGuard
TaskStateMutRef
TaskStateRef
TaskWriteGuard
ThreadGroupReadGuard
ThreadGroupStateMutRef
ThreadGroupStateRef
ThreadGroupWriteGuard
UtsNamespaceHandle