mirror of
https://github.com/drasko/codezero.git
synced 2026-01-12 10:53:16 +01:00
67 lines
3.4 KiB
Groff
Executable File
67 lines
3.4 KiB
Groff
Executable File
.TH CAPABILITY 7 2009-11-07 "Codezero" "Codezero Programmer's Manual"
|
|
.SH NAME
|
|
.nf
|
|
.BR "Capability" " - Overview of Capabilities in Codezero"
|
|
|
|
.SH SYNOPSIS
|
|
.nf
|
|
.B #include <l4/api/capability.h>
|
|
.B #include <l4/generic/cap-types.h>
|
|
|
|
|
|
.SH DESCRIPTION
|
|
A capability is a unique representation of security qualifiers on a particular resource.
|
|
Each thread, address space and container is associated with its own capability list represented by the below structure.
|
|
|
|
The capability structure is defined as follows:
|
|
.nf
|
|
.TP
|
|
.BI "struct" " capability " "{"
|
|
.in 16
|
|
.BI "struct link " "list" ";"
|
|
.BI ""
|
|
/* Capability identifiers */
|
|
.BI "l4id_t " "capid" "; /* Unique capability ID */"
|
|
.BI "l4id_t " "owner" "; /* Capability owner ID */"
|
|
.BI "l4id_t " "resid" "; /* Targeted resource ID */"
|
|
.BI "unsigned int " "type" "; /* Capability and target resource type */"
|
|
.BI ""
|
|
/* Capability permissions */
|
|
.BI "u32 " "access" "; /* Permitted operations */"
|
|
.BI ""
|
|
/* Other Limits/Attributes of the resource */
|
|
.BI "unsigned long " "start" "; /* Resource start value */"
|
|
.BI "unsigned long " "end" "; /* Resource end value */"
|
|
.BI "unsigned long " "size" "; /* Resource size */"
|
|
.BI ""
|
|
.BI "unsigned long " "used" "; /* Resource used size */"
|
|
.BI "unsigned int " "attr" "; /* User-defined attribute. (Device index and type on devices) */"
|
|
.BI "l4id_t " "irq" "; /* Device irq (Devices Only) */"
|
|
.in 6
|
|
.B };
|
|
|
|
.TP
|
|
.fi
|
|
.I capid
|
|
denotes the unique capability ID.
|
|
.TP
|
|
.fi
|
|
.I resid
|
|
denotes the unique ID of targeted resource. The smallest resource targetable by a capability is a thread. There are also collections of targetable resources such as an address space or a container. An address space target resource implies all threads inside that address space, and a container target resource implies all threads inside that container. Quantitative capabilities such as typed memory pools do not possess a target, and therefore have an invalid resource ID.
|
|
.TP
|
|
.fi
|
|
.I owner
|
|
denotes the unique ID of the one and only capability owner. This is always a thread ID. The ownership of a capability determines who has the right to practise the capability modification privileges available over the capability, such as sharing, granting, spliting, reducing or destruction of the capability.
|
|
.TP
|
|
.fi
|
|
.I type
|
|
field contains the capability type or targeted resource type. The capability type determines the generic operations that the capability describes. For example a capability describing a system call would likely have a type name that resembles the name of that system call. See below for the list of valid capability types. The resource type denotes the type of targeted resources. In case this is a thread or a collection of threads, the type may be one of thread, address space, or container. Quantitative resources also have different types, describing the resource. Since quantitative resources such as memory pools, or memory regions are not associated with a target id, the types have no meaning for the resid field for these capabilities. See below for the full list of valid resource types.
|
|
.TP
|
|
.fi
|
|
.I access
|
|
field denotes the fine-grain operations available on a particular resource. The meaning of each bitfield differs according to the type of the capability. For example, for a capability type thread_control, the bitfields may mean suspend, resume, create, delete etc. See below for the full list of capability bits.
|
|
|
|
|
|
.SH SEE ALSO
|
|
.BR "l4_capability_control"(7)
|