Moin *,

this is about combining SKAS & XEN without having any clue.
If you are only interested in the details, go here:

  <http://nils.toedtmann.net/stuff/xen-skas.txt>

It does not really work, but almost. Maybe it's only a small 
last step to produce a functional SKAS-on-XEN-patch. Maybe 
someone could complete it? 

######

I run several UMLs, and know i started playing with XEN. 
What is needed for testing and migration is a linux kernel 
which can act as a UML host (SKAS & sysemu patch) _and_ as 
a XEN host (XEN patch, configured for a "XEN domain 0").

So I patched a linuxtree with both and tried to understand 
why it would not work. Spending some time on the trial-and-
error-method i came to the hypothesis (as i have NO F*CKING 
CLUE WHAT THE HELL I'M DOING HERE, i should say: wild guess) 
that i had to re-apply the SKAS-patches for arch/i386/* and 
include/asm-i386/* to arch/xen/i386/* and include/asm-xen/\
/asm-i386/*, too. Surprisingly that worked - more or less:

The patches apply (with offsets, but no rejects), the host-
kernel (XEN domain 0) builds, boots and runs. On that host-
kernel, most applications run fine (firefox and some gnome-
applets got unstable, but that seems to happen without SKAS, 
too).

Indeed: now i can boot the same system image as a UML guest 
or as a XEN guest ("unprivileged domains"), and UML recog-
nizes SKAS, /proc/mm & sysemu! 

Unfortunately, within my FC3 UMLs some binaries now crash :-(
While sysV startup (including network, cron, syslog, sshd),
bash, find, host, ping, ... all work fine, others like 
/bin/rpm or /bin/ls segfault. /usr/bin/vim also segfaults, 
but when it runs within strace, it works (WTF?). I could not 
produce such segfaults within a debian (woody) UML, yet.

Example segfault (FC3, /bin/ls):

  <http://nils.toedtmann.net/stuff/ls-strace.txt>

All segfaults i looked at end with

  set_thread_area(...) = -1 ENOSYS (Function not implemented)
  modify_ldt(...) = 0
  --- SIGSEGV (Segmentation fault) @ 0 (0) ---

The "set_thread_area(...) = -1 ENOSYS" is normal (or?), 
since there are no TLS libs any more, so it comes down to
"modify_ldt". Maybe it's not coincidence that one of the
kernel files i patched was arch/xen/i386/kernel/ldt.c ...? 
(ooops, yet another wild guess)

When the host runs a non-SKAS XEN kernel, the segfaults in-
side the UMLs disappear (but performance disappears, too).

So it seems that this task cannot be accomplished without 
some knowledge ... anybody?

/nils.


ps: Booting a FC3 image as UML ...

  $ /home/uml/boot/linux-2.6.9-bb4-terminal-cleanup-nils9 umid=FC3test mem=128M 
\
    con=null con0=null,fd:1 con1=fd:0,fd:1 eth0=tuntap,tap0,FE:FD:00:DE:AD:09 \
    ubda=/home/uml/ubd/FC3-rootfs.ext3 ubdb=/home/uml/ubd/swap


... translates to this config file /etc/xen/FC3test.xm

  kernel = "/boot/vmlinuz-2.6.10-xen-2.0.4-domU-nils.2"
  name   = "FC3test"
  memory = 128
  nics   = 1
  vif    = [ 'mac=FE:FD:00:DE:AD:09, bridge=xen-br0' ]
  disk   = [ 'file:/home/uml/ubd/FC3-rootfs.ext3,hda1,w', 
'file:/home/uml/ubd/swap,hda2,w' ]
  root   = "/dev/hda1 ro"

... and this XEN domain startup command:

  # xm create -c FC3test.xm

You only have to switch the guest's fstab from ubd* to hd*.

-- 
there is no sig.


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user

Reply via email to