mirror of
https://github.com/drasko/codezero.git
synced 2026-07-13 10:54:12 +02:00
Updates to capability and l4_capability_control
This commit is contained in:
@@ -3,6 +3,11 @@
|
|||||||
.nf
|
.nf
|
||||||
.BR "Capability" " - Overview of Capabilities in Codezero"
|
.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
|
.SH DESCRIPTION
|
||||||
A capability is a unique representation of security qualifiers on a particular resource.
|
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.
|
Each thread, address space and container is associated with its own capability list represented by the below structure.
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
.TH L4_CAPABILITY_CONTROL 7 2009-11-07 "Codezero" "Codezero Programmer's Manual"
|
.TH L4_CAPABILITY_CONTROL 7 2009-11-07 "Codezero" "Codezero Programmer's Manual"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
.nf
|
.nf
|
||||||
.BR "l4_capability_control" "- Set/Get Various capabilities of thread"
|
.BR "l4_capability_control" " - Capability inspection and manipulation"
|
||||||
|
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
.nf
|
.nf
|
||||||
@@ -11,17 +11,24 @@
|
|||||||
.BI "int l4_capability_control (unsigned int " "req" ", unsigned int " "flags",
|
.BI "int l4_capability_control (unsigned int " "req" ", unsigned int " "flags",
|
||||||
.BI " l4id_t " "capid" ", l4id_t " "tid" ", void " "*buf" ");"
|
.BI " l4id_t " "capid" ", l4id_t " "tid" ", void " "*buf" ");"
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
.BR l4_capability_control() " -"
|
.BR l4_capability_control() " - "
|
||||||
Sets various capabilities of a thread, capabilities are read/modified always with respect to current task/thread, current address space or current container. The thread calling this system call must posses a capability to do capability. It returns
|
enables a thread to read and manipulate the list of capabilities that it possesses. Capabilities may be shared, granted to other threads, or they may be replicated, destroyed, reduced in privileges or split into parts, effectively enabling a dynamically configurable resource management architecture. The thread calling this system call must possess relevant capabilities as any operation done by this call are also subject to capability checking.
|
||||||
.B ENOCAP
|
.TP
|
||||||
if the capabilities specified by
|
.fi
|
||||||
.I req
|
.I req
|
||||||
and
|
denotes the type of request. See below for a full list.
|
||||||
|
.TP
|
||||||
|
.fi
|
||||||
.I flags
|
.I flags
|
||||||
are not valid capabilities for current thread.
|
denotes additional flags for the given request. See below for a list of flags.
|
||||||
|
.TP
|
||||||
|
.fi
|
||||||
|
|
||||||
.I req
|
.I buf
|
||||||
is type of requtest and can take one of these values
|
almost always contains a capability structure that describes the request with regard to given
|
||||||
|
.IR "req"
|
||||||
|
and
|
||||||
|
.IR "flags."
|
||||||
.TP
|
.TP
|
||||||
.BR CAP_CONTROL_NCAPS
|
.BR CAP_CONTROL_NCAPS
|
||||||
Get capability count, sum of private capabilities, address space capabilities and container capabilities.
|
Get capability count, sum of private capabilities, address space capabilities and container capabilities.
|
||||||
@@ -64,7 +71,7 @@ Capabilities are split by diff'ing resources possessed between capabilities.
|
|||||||
.I flags
|
.I flags
|
||||||
may be one of
|
may be one of
|
||||||
.B CAP_SPLIT_SIZE
|
.B CAP_SPLIT_SIZE
|
||||||
or
|
,
|
||||||
.B CAP_SPLIT_ACCESS
|
.B CAP_SPLIT_ACCESS
|
||||||
or
|
or
|
||||||
.B CAP_SPLIT_RANGE.
|
.B CAP_SPLIT_RANGE.
|
||||||
@@ -95,10 +102,12 @@ Returns 0 on success, and negetive error value on failure. See below for errors
|
|||||||
.SH ERRORS
|
.SH ERRORS
|
||||||
.TP
|
.TP
|
||||||
.B EINVAL
|
.B EINVAL
|
||||||
when a capability struct is passed, but it has some invalid fields.
|
when a capability struct is passed in
|
||||||
|
.IR "buf"
|
||||||
|
but has some invalid fields.
|
||||||
.TP
|
.TP
|
||||||
.B ENOCAP
|
.B ENOCAP
|
||||||
when capabilities doesn't match or doesn't exists.
|
when capabilities required don't exist or do not have sufficient privileges.
|
||||||
|
|
||||||
.SH SEE ALSO
|
.SH SEE ALSO
|
||||||
.BR "capability"(7)
|
.BR "capability"(7)
|
||||||
|
|||||||
Reference in New Issue
Block a user