Difference between revisions of "XENStatements"

From SELinux Wiki
Jump to: navigation, search
(Xen Statements)
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
= Xen Statements =
 
= Xen Statements =
Xen policy supports additional policy language statements: <tt>iomemcon</tt>, <tt>ioportcon</tt>, <tt>pcidevicecon</tt> and <tt>pirqcon</tt> that are discussed in the sections that follow.
+
Xen policy supports additional policy language statements: <tt>iomemcon</tt>, <tt>ioportcon</tt>, <tt>pcidevicecon</tt>, <tt>pirqcon</tt> and <tt>devicetreecon</tt> that are discussed in the sections that follow, also the [http://xenbits.xen.org/docs/4.2-testing/misc/xsm-flask.txt XSM/FLASK Configuration] document contains further information.
  
 
Policy version 30 introduced the <tt>[[#devicetreecon | devicetreecon]]</tt> statement and also expanded the existing I/O memory range to 64 bits in order to support hardware with more than 44 bits of physical address space (32-bit count of 4K pages).
 
Policy version 30 introduced the <tt>[[#devicetreecon | devicetreecon]]</tt> statement and also expanded the existing I/O memory range to 64 bits in order to support hardware with more than 44 bits of physical address space (32-bit count of 4K pages).
Line 11: Line 11:
 
'''The statement definition is:'''
 
'''The statement definition is:'''
 
<pre>
 
<pre>
iomemcon addr context;
+
iomemcon addr context
 
</pre>
 
</pre>
  
Line 58: Line 58:
 
'''Example:'''
 
'''Example:'''
 
<pre>
 
<pre>
iomemcon 0xfebd9 system_u:object_r:nicP_t;
+
iomemcon 0xfebd9 system_u:object_r:nicP_t
 
+
iomemcon 0xfebe0-0xfebff system_u:object_r:nicP_t
iomemcon 0xfebe0-0xfebff system_u:object_r:nicP_t;
+
 
</pre>
 
</pre>
  
Line 69: Line 68:
 
'''The statement definition is:'''
 
'''The statement definition is:'''
 
<pre>
 
<pre>
ioportcon port context;
+
ioportcon port context
 
</pre>
 
</pre>
  
Line 116: Line 115:
 
'''Example:'''
 
'''Example:'''
 
<pre>
 
<pre>
ioportcon 0xeac0 system_u:object_r:nicP_t;
+
ioportcon 0xeac0 system_u:object_r:nicP_t
 
+
ioportcon 0xecc0-0xecdf system_u:object_r:nicP_t
ioportcon 0xecc0-0xecdf system_u:object_r:nicP_t;
+
 
</pre>
 
</pre>
  
Line 127: Line 125:
 
'''The statement definition is:'''
 
'''The statement definition is:'''
 
<pre>
 
<pre>
pcidevicecon pci_id context;
+
pcidevicecon pci_id context
 
</pre>
 
</pre>
  
Line 174: Line 172:
 
'''Example:'''
 
'''Example:'''
 
<pre>
 
<pre>
pcidevicecon 0xc800 system_u:object_r:nicP_t;
+
pcidevicecon 0xc800 system_u:object_r:nicP_t
 
</pre>
 
</pre>
  
Line 183: Line 181:
 
'''The statement definition is:'''
 
'''The statement definition is:'''
 
<pre>
 
<pre>
pirqcon irq context;
+
pirqcon irq context
 
</pre>
 
</pre>
  
Line 230: Line 228:
 
'''Example:'''
 
'''Example:'''
 
<pre>
 
<pre>
pirqcon 33 system_u:object_r:nicP_t;
+
pirqcon 33 system_u:object_r:nicP_t
 
</pre>
 
</pre>
  
Line 238: Line 236:
 
'''The statement definition is:'''
 
'''The statement definition is:'''
 
<pre>
 
<pre>
devicetreecon path context;
+
devicetreecon path context
 
</pre>
 
</pre>
  
Line 249: Line 247:
 
|-
 
|-
 
| path
 
| path
| the device tree path.
+
| the device tree path. If this contains spaces enclose within "".
  
 
|-
 
|-
Line 285: Line 283:
 
'''Example:'''
 
'''Example:'''
 
<pre>
 
<pre>
devicetreecon "/this is/a/path" system_u:object_r:arm_path;
+
devicetreecon "/this is/a/path" system_u:object_r:arm_path
 
</pre>
 
</pre>
  

Latest revision as of 15:31, 19 March 2015

Xen Statements

Xen policy supports additional policy language statements: iomemcon, ioportcon, pcidevicecon, pirqcon and devicetreecon that are discussed in the sections that follow, also the XSM/FLASK Configuration document contains further information.

Policy version 30 introduced the devicetreecon statement and also expanded the existing I/O memory range to 64 bits in order to support hardware with more than 44 bits of physical address space (32-bit count of 4K pages).

To compile these additional statements using semodule(8), ensure that the semanage.conf(5) file has the policy-target=xen entry.

iomemcon

Label i/o memory. This may be a single memory location or a range.

The statement definition is:

iomemcon addr context

Where:

iomemcon The iomemcon keyword.
addr The memory address to apply the context. This may also be a range that consists of a start and end address separated by a hypen (-).
context The security context to be applied.


The statement is valid in:

Monolithic Policy
Base Policy
Module Policy
Yes
Yes
No
if Statement
optional Statement
require Statement
No
No
No


Example:

iomemcon 0xfebd9 system_u:object_r:nicP_t
iomemcon 0xfebe0-0xfebff system_u:object_r:nicP_t


ioportcon

Label i/o ports. This may be a single port or a range.

The statement definition is:

ioportcon port context

Where:

ioportcon The ioportcon keyword.
port The port to apply the context. This may also be a range that consists of a start and end port number separated by a hypen (-).
context The security context to be applied.


The statement is valid in:

Monolithic Policy
Base Policy
Module Policy
Yes
Yes
No
if Statement
optional Statement
require Statement
No
No
No


Example:

ioportcon 0xeac0 system_u:object_r:nicP_t
ioportcon 0xecc0-0xecdf system_u:object_r:nicP_t


pcidevicecon

Label a PCI device.

The statement definition is:

pcidevicecon pci_id context

Where:

pcidevicecon The pcidevicecon keyword.
pci_id The PCI indentifer.
context The security context to be applied.


The statement is valid in:

Monolithic Policy
Base Policy
Module Policy
Yes
Yes
No
if Statement
optional Statement
require Statement
No
No
No


Example:

pcidevicecon 0xc800 system_u:object_r:nicP_t


pirqcon

Label an interrupt level.

The statement definition is:

pirqcon irq context

Where:

pirqcon The pirqcon keyword.
irq The interrupt request number.
context The security context to be applied.


The statement is valid in:

Monolithic Policy
Base Policy
Module Policy
Yes
Yes
No
if Statement
optional Statement
require Statement
No
No
No


Example:

pirqcon 33 system_u:object_r:nicP_t

devicetreecon

Label device tree nodes.

The statement definition is:

devicetreecon path context

Where:

devicetreecon The devicetreecon keyword.
path the device tree path. If this contains spaces enclose within "".
context The security context to be applied.


The statement is valid in:

Monolithic Policy
Base Policy
Module Policy
Yes
Yes
No
if Statement
optional Statement
require Statement
No
No
No


Example:

devicetreecon "/this is/a/path" system_u:object_r:arm_path


Previous
Home
Next