Commit Graph
18 Commits
Author SHA1 Message Date
Keir Fraser 8950f5c6ba Extend 'xm dumppolicy' to support Xen-API
I am extending 'xm dumppolicy' to be used via the Xen-API. For this
there are two new functions in the ACM policy class:
 - get the currently enforced policy including statistical data from
   the hypervisor
- get the ACM 'ssidref' of a Domain. Since this may be a ACM-specific
  variable or type (int) I put it into the ACM class.

I extended the Xen-API documentation with the two new functions.

Signed-off-by: Stefan Berger <Stefanb@us.ibm.com>
2007-10-03 14:04:51 +01:00
kfraser@localhost.localdomain 61c6564d34 Cleanups after XSM checkin.
Signed-off-by: Keir Fraser <keir@xensource.com>

--HG--
rename : xen/include/public/acm.h => xen/include/public/xsm/acm.h
rename : xen/include/public/acm_ops.h => xen/include/public/xsm/acm_ops.h
rename : xen/include/acm/acm_core.h => xen/include/xsm/acm/acm_core.h
rename : xen/include/acm/acm_endian.h => xen/include/xsm/acm/acm_endian.h
rename : xen/include/acm/acm_hooks.h => xen/include/xsm/acm/acm_hooks.h
2007-08-31 12:05:07 +01:00
kfraser@localhost.localdomain fab51b46ae [ACM] Simpler interface to hypercalls
Implement a simpler interface for the hypercalls to ACM. I put the
parameters to all hypercalls into a union. On top of this I have
implemented a shim layer for enabling ACM hypercalls on PPC.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2007-05-24 10:18:55 +01:00
Keir Fraser 856a272f35 [security] When building the binary policy align its contents the same way as the
ACM module does when returning its contents.
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2007-04-19 19:29:19 +01:00
kfraser@localhost.localdomain 7f6d8fe5c9 acm: Provide the possibility to choose the VM label of domain-0 in the
kernel line in grub.conf. The format is
ssidref=<ssidref>:sHype:<policy name>:<vm label>. The name of the
policy specified here must be the same name as the in the policy
provided as a module during boot, otherwise the policy will not be
accepted and the system then starts without a policy. The user tool
for 'xm dumppolicy' has been adapted to show which entry in the binary
policy is used by domain-0.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2007-03-29 19:26:13 +01:00
kfraser@localhost.localdomain a10e171a41 [ACM] Allow version information to be embedded in the XML representation of
the ACM policy. The translation tool has been adapted to parse the
version found in the XML representation and put it into the binary
policy. Xen has been adapted to remember the version information and
report it when asked for the current policy.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2007-03-28 14:00:56 +01:00
kfraser@localhost.localdomain 81ba8bb990 [ACM] Fix binary alignment in tools.
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2006-10-18 17:29:08 +01:00
kaf24@firebug.cl.cam.ac.uk ffa0b25d43 [ACM] Complete the conversion of acm_ops using Xen handles instead
of void pointers. It also fixes a recently slipped in acm bug that hangs 
Xen when a domain is destroyed.

Signed-off by: Reiner Sailer <sailer@us.ibm.com>
2006-06-17 08:38:35 +01:00
kaf24@firebug.cl.cam.ac.uk 630ad4e0ad [ACM] Replace the union structure parameter of the ACM hypercalls
with command-specific request structures. It aligns the ACM
hypercalls with the way parameters are passed in the event channel
hypercalls.

Advantages include backward-compatibility regarding old guests when
new calls are added and clarity of the code.

Signed-off by: Reiner Sailer <sailer@us.ibm.com>
2006-05-21 19:05:31 +01:00
kaf24@firebug.cl.cam.ac.uk 2d0922d515 Move Linux-specific privcmd code into private libxc implementations.
Make header path for kernel's privcmd/evtchn headers generic.
Remove pointless xi_*() interface that was using private libxc
interfaces.

Signed-off-by: John Levon <john.levon@sun.com>
2006-05-02 15:12:06 +01:00
smh22@firebug.cl.cam.ac.uk 30476c8dba This patch adds support in the hypervisor for the policy name attribute
introduced into security policies. It also fixes a minor problem related 
to handling unsupported boot policies.

Signed-off by: Reiner Sailer <sailer@us.ibm.com>
2006-04-24 10:51:50 +01:00
emellor@leeni.uk.xensource.com 548733e866 The attached patch makes a couple of changes to the ACM security tools
and installation. Particularly it does the following:
- the Makefile installs the ACM security-related tools
into /etc/xen/acm-security
- improves and cleans up some of the tools
- updates the documentation

Signed-off-by: Tom Lendacky <toml@us.ibm.com>
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2005-12-08 18:21:05 +00:00
kaf24@firebug.cl.cam.ac.uk cc677c9d4e This patch to the Xen access control module (ACM) and tools:
1. adapts ACM hooks to the slightly changed event channel structure
  2. introduces an ACM_GETDECISION command, which enables authorized 
domains to retrieve policy decisions regarding the sharing of resources 
(STE policy) from the Xen hypervisor
  3. includes cleanup (warnings I found when applying  analysis tools such 
as beam or flawfinder to the ACM code)

 The get_decision function is useful to enforce:
   *  the security policy on network traffic  in the network backends in 
domain 0; currently there is no enforcement in Dom0 and all packets flow 
freely
   *  the security policy in block device backends to control which 
domains can access which vdisk resources

I have added a small test program that shows how to use the get_decision 
ACM interface call, it is in tools/security/get_decision.c and will be 
compiled together with the policy tools. As usual, the ACM is unconfigured 
until you switch on a security policy on in Config.mk.

Signed-off: Reiner Sailer <sailer@us.ibm.com>
2005-10-20 21:37:15 +01:00
kaf24@firebug.cl.cam.ac.uk d8263e8dba Fix Xen public interfaces and the tools to consistently
use stdint-format bitsize types (uint32_t and friends).

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-12 11:07:37 +01:00
kaf24@firebug.cl.cam.ac.uk 7e9596058b This patch:
* adds a get_ssid ACM command that allows privileged domains to retrieve 
types for either a given ssid reference or a given domain id (of a running 
domain); this command can be used to extend access control into device 
domains, e.g., to control network traffic currently moving through Domain 
0 uncontrolled by the ACM policy

* adds a script getlabel.sh that allows users inside Dom0 to retrieve the 
label for a given ssid reference or a given domain id (multiple labels 
might map onto a single ssid reference)

* cleans up label-related code in tools/security by merging common 
functions into labelfuncs.sh

* cleans up ACM code related to above changes (eventually approximating a 
common coding style)

Signed-off-by Reiner Sailer <sailer@us.ibm.com> 
Signed-off by Stefan Berger <stefanb@us.ibm.com>
2005-09-02 07:59:12 +00:00
kaf24@firebug.cl.cam.ac.uk 39ec3e6c6a This patch:
* adds a C-based security policy translation tool to Xen (secpol_xml2bin) 
and removes the current Java 
security policy translator (Java dependencies).  The C-based tool 
integrates into the Xen source tree build 
and install (using gnome libxml2 for XML parsing). See install.txt.

* introduces security labels and related tools. Users can now use 
semantic-rich label names to put security-tags 
on domains. See example.txt, policy.txt.

* moves the security configuration (currently ACM_USE_SECURITY_POLICY) 
from xen/Rules.mk 
into a separate top-level Security.mk file  (it is needed by the 
tools/security and xen/acm).

Both xen/acm and tools/security are built during the Xen build process 
only if ACM_USE_SECURITY_POLICY 
is not ACM_NULL_POLICY (which is the default setting).

Signed-off-by Reiner Sailer <sailer@us.ibm.com>
Signed-off by Stefan Berger <stefanb@us.ibm.com>
Signed-off by Ray Valdez <rvaldez@us.ibm.com>
2005-08-19 09:03:17 +00:00
kaf24@firebug.cl.cam.ac.uk 3184c77cda Memory leak in xc_linux_save, and uninitialised var
in secpol_tool.
Signed-off-by: Jerone Young <jyoung5@us.ibm.com>
2005-08-11 22:12:11 +00:00
smh22@firebug.cl.cam.ac.uk 6b3b33d853 Remainder of ACM patch (hgrrrr).
Signed-off-by: Reiner Sailer <sailer@watson.ibm.com>
Signed-off-by: Steven Hand <steven@xensource.com>
2005-08-02 10:15:17 +00:00