<br><font size=2 face="sans-serif">I have been approached for help in enabling
sHype/ACM for Xen on an FC6 system using Fedora sources only.  Since
sHype/ACM is still disabled by default in Xen, you need to recompile and
re-install Xen to enable it. I have attached a short howto, since this
procedure might not be straight-forward for the general user.</font>
<br>
<br><font size=2 face="sans-serif">sHype/ACM is part of the core Xen distribution
and includes mandatory access control in the Xen hypervisor. sHype controls
sharing between user domains (controls which domains can communicate with
each other and which domains can access which resources) and enforces anti-collocation
rules (controls which domains can run simultaneously on the same platform)
with simple formal security policies. Please refer to the Xen user guide
section about sHype/ACM for more details and for usage/test examples and
current limitations.</font>
<br>
<br><font size=2 face="sans-serif">You do not  need to follow this
howto if you choose to install the original Xensource.com Xen version and
the 2.6.16.29 Xen kernel. In this case, the Xen user guide for sHype/ACM
includes all information needed for configuration,  installation,
and usage examples.</font>
<br>
<br><font size=2 face="sans-serif">Feedback / corrections / improvements
are welcome (I am not an FC6 specialist!).</font>
<br>
<br><font size=2 face="sans-serif">Regards</font>
<br><font size=2 face="sans-serif">Reiner</font>
<br>
<br><font size=2 face="sans-serif">=======================================HOWTO</font>
<br>
<br><font size=2 face="Courier New">BUILD AND INSTALL SHYPE/ACM XEN FROM
FEDORA CORE 6 SOURCES</font>
<br><font size=2 face="Courier New">***********************************************************</font>
<br>
<br><font size=2 face="Courier New">Foreword: You can use the official
Xen source install from Xensource.com and configure ACM (see Xen user guide).
However, Xen comes with a  2.6.16.29 kernel by default. If you depend
on a FC6 2.6.18 kernel running on Xen and you want the sHype ACM security
extension, then the following document describes how to get there from
a clean non-virtualized FC6 install.</font>
<br>
<br><font size=2 face="Courier New">The following step-wise description
shows how to get sources, configure them, and install them so that sHype/ACM
security is enabled in Xen on FC6 for the latest FC6 kernel.</font>
<br>
<br><font size=2 face="Courier New">Once you run sHype/ACM Xen, you can
refer to the Xen user guide manual chapter (found in: ) 10 to walk through
usage examples.</font>
<br>
<br>
<br><font size=2 face="Courier New">A) Get source Xen/Kernel for FC6 (from
any FC6 mirror)</font>
<br><font size=2 face="Courier New">======================================================</font>
<br><font size=2 face="Courier New">ftp://ftp.linux.ncsu.edu/pub/fedora/linux/core/updates/6/SRPMS</font>
<br><font size=2 face="Courier New">download:</font>
<br><font size=2 face="Courier New">kernel-2.6.18-1.2849.fc6.src.rpm</font>
<br><font size=2 face="Courier New">ftp://ftp.linux.ncsu.edu/pub/fedora/linux/core/6/source/SRPMS</font>
<br><font size=2 face="Courier New">download:</font>
<br><font size=2 face="Courier New">xen-3.0.3-0.1.rc3.src.rpm</font>
<br>
<br>
<br><font size=2 face="Courier New">B) Unpack source rpm</font>
<br><font size=2 face="Courier New">====================</font>
<br><font size=2 face="Courier New">rpm -ihv kernel-2.6.18-1.2849.fc6.src.rpm</font>
<br><font size=2 face="Courier New">rpm -ihv xen-3.0.3-0.1.rc3.src.rpm</font>
<br>
<br>
<br><font size=2 face="Courier New">C) Create sources and configure sHype
Access Control Module for Xen</font>
<br><font size=2 face="Courier New">===================================================================</font>
<br><font size=2 face="Courier New">(this step creates the sources into
/usr/src/redhat/BUILD)</font>
<br><font size=2 face="Courier New">cd /usr/src/redhat/SPECS</font>
<br><font size=2 face="Courier New">rpmbuild -bp xen.spec</font>
<br><font size=2 face="Courier New">rpmbuild -bp kernel-2.6.spec</font>
<br>
<br>
<br><font size=2 face="Courier New">D) Build/Install Xen</font>
<br><font size=2 face="Courier New">====================</font>
<br><font size=2 face="Courier New">Note: it appears that most problems
in this stage stem from inconsistent PAE settings in Xen and Kernel (must
be the same).</font>
<br>
<br><font size=2 face="Courier New">i) Configure + install security enabled
Xen and tools: </font>
<br><font size=2 face="Courier New">cd /usr/src/redhat/BUILD/xen-3.0.3-rc3</font>
<br><font size=2 face="Courier New">edit Config.mk and set following variables
for PAE/no PAE:</font>
<br>
<br><font size=2 face="Courier New">i.a) if you DON'T want PAE support
(<4GB on x386):</font>
<br><font size=2 face="Courier New">XEN_TARGET_X86_PAE  ?= n</font>
<br><font size=2 face="Courier New">ACM_SECURITY ?= y</font>
<br>
<br><font size=2 face="Courier New">i.b) if you DO want PAE support:</font>
<br><font size=2 face="Courier New">XEN_TARGET_X86_PAE  ?= y</font>
<br><font size=2 face="Courier New">ACM_SECURITY ?= y</font>
<br>
<br><font size=2 face="Courier New">ii) Now save Config.mk and exit editor.</font>
<br>
<br><font size=2 face="Courier New">iii) in the current xen-3.0.3-rc3 directory:</font>
<br><font size=2 face="Courier New">root# (cd LibVNCServer-0.8.2; make
install)</font>
<br><font size=2 face="Courier New">root# make xen tools</font>
<br>
<br><font size=2 face="Courier New">Note: do not just 'make' because it
will take a long time to build the kernel and you are not going to use
it (see below)</font>
<br>
<br><font size=2 face="Courier New">iv) </font>
<br><font size=2 face="Courier New">root# make install-xen; make install-tools</font>
<br>
<br><font size=2 face="Courier New">v) Install wxPython for ez-Security
Policy tool</font>
<br><font size=2 face="Courier New">root# yum install wxPython</font>
<br>
<br><font size=2 face="Courier New">Test: /usr/sbin/xensec_ezpolicy should
bring up a GUI (close it)</font>
<br>
<br>
<br><font size=2 face="Courier New">E) BUILD/INSTALL FC6 Kernel for Xen</font>
<br><font size=2 face="Courier New">===================================</font>
<br><font size=2 face="Courier New">We only use the 2.6.18.i386 kernel
from this install. Not xen.</font>
<br>
<br><font size=2 face="Courier New">i) Configure + install FC6 Kernel for
Xen: </font>
<br><font size=2 face="Courier New">root# cd /usr/src/redhat/BUILD/kernel-2.6.18/linux-2.6.18.i386</font>
<br><font size=2 face="Courier New">root# cp configs/kernel-2.6.18.i686-xen.config
.config</font>
<br>
<br><font size=2 face="Courier New">use 'make menuconfig' or 'make gconfig'
to configure the following variables for PAE/no PAE:</font>
<br>
<br><font size=2 face="Courier New">i.a) if you DON'T want PAE support
(<4GB on x386):</font>
<br><font size=2 face="Courier New">In submenu: Processor_type_and_features->High_Memory_Support</font>
<br><font size=2 face="Courier New">set HIMEM to 4GB</font>
<br>
<br><font size=2 face="Courier New">i.b) if you DO want PAE support:</font>
<br><font size=2 face="Courier New">In submenu: Processor_type_and_features->High_Memory_Support</font>
<br><font size=2 face="Courier New">set HIMEM to 64GB</font>
<br>
<br><font size=2 face="Courier New">ii) Compile + Install kernel (currently,
the kernel is not ACM specific)</font>
<br><font size=2 face="Courier New">Note: If you already have a proprietary
kernel installed, you might want to name the kernel by setting the LOCALVERSION
config parameter.</font>
<br>
<br><font size=2 face="Courier New">root# make all</font>
<br><font size=2 face="Courier New">root# make modules_install</font>
<br><font size=2 face="Courier New">root# make install</font>
<br>
<br>
<br><font size=2 face="Courier New">F) CREATE BOOT ENTRY</font>
<br><font size=2 face="Courier New">====================</font>
<br><font size=2 face="Courier New">Mine looks as follows (using xen/kernel
that were built/installed above):</font>
<br>
<br><font size=2 face="Courier New">title XEN sHype/ACM (2.6.18-1.2849-xen)</font>
<br><font size=2 face="Courier New">        root (hd0,0)</font>
<br><font size=2 face="Courier New">        kernel
/xen-3.0.3-rc3.gz</font>
<br><font size=2 face="Courier New">        module
/vmlinuz-2.6.18-prep ro root=/dev/hda3 rhgb</font>
<br><font size=2 face="Courier New">        module
/initrd-2.6.18-prep.img</font>
<br>
<br><font size=2 face="Courier New">Make sure you have the initrd and that
you have the proper file prefix for the files. This example assumes that
you mount /boot. You might need to build the initrd manually if it does
not show up in the /boot directory after the kernel make install:</font>
<br>
<br><font size=2 face="Courier New">root #cd /boot</font>
<br><font size=2 face="Courier New">root #mkinitrd initrd-2.6.18-prep.img
2.6.18-prep</font>
<br>
<br>
<br><font size=2 face="Courier New">G) WHERE DO I GO FROM HERE</font>
<br><font size=2 face="Courier New">==========================</font>
<br><font size=2 face="Courier New">If you boot into sHype/ACM XEN, then
you need to label resources and domains. For this, you need a policy. Without
it, you can start domain 0 but no other domains. Please refer to the Xen
User Guide (currently chapter 10) for further information.</font>
<br>
<br><font size=2 face="sans-serif">=======================================END<br>
__________________________________________________________<br>
Reiner Sailer, Research Staff Member, Secure Systems Department<br>
IBM T J Watson Research Ctr, 19 Skyline Drive, Hawthorne NY 10532<br>
Phone: 914 784 6280  (t/l 863)  Fax: 914 784 6205, sailer@us.ibm.com
 <br>
http://www.research.ibm.com/people/s/sailer/</font>