Email List: Xaustin-group-futures-lX
[All Lists]

Re: msocket proposal

To: Nick Stoughton <nick@xxxxxxxxxx>
Subject: Re: msocket proposal
From: Renzo Davoli <renzo@xxxxxxxxxxx>
Date: Wed, 18 Feb 2009 21:50:59 +0100
Cc: Andrew Josey <ajosey@xxxxxxxxxxxxxxxxx>, austin-group-futures-l@xxxxxxxxxxxxx
References: <20090218104318.GH6237@cs.unibo.it> <1234987473.6019.178.camel@amstaff2.msbit.com>
On Wed, Feb 18, 2009 at 08:04:33PM +0000, Nick Stoughton wrote:
> can you provide some implementation information? Has this been
> implemented? What systems? Is it shipping in any distribution, or is it
> just in an experimental state? 
Yes, it has been implemented in View-OS.
We have not developed a patch for the Linux Kernel yet, therefore the
feature can be currently used only inside our virtual machines (umview/kmview).
The meaning of this message is also to test the degree of interest for msocket 
and
to start some brainstorming of possible usage cases (or drawbacks).

As an example, this is a commented umview session:

$ umview bash            #
This kernel supports: PTRACE_MULTI PTRACE_SYSVM ppoll 
UMView will use: PTRACE_MULTI PTRACE_SYSVM ppoll 

pure_libc library found: syscall tracing allowed
$                        #this is the prompt of the (partial) virtual machine
$ um_add_service umnet   #this loads the module for virtual networking
umnet init
$ mount -t umnetlwipv6 none /dev/net/newstack
                         #this "mounts" a lwipv6 stack on /dev/net/newstack
                         # (*) see below
$ ip addr                #these are the interfaces of the standard stack
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP 
qlen 1000
    link/ether 00:18:8b:a9:81:81 brd ff:ff:ff:ff:ff:ff
$ mstack /dev/net/newstack ip addr
                         #this are /dev/net/newstack interfaces 
1: lo0: <LOOPBACK,UP> mtu 0 
    link/loopback 
    inet6 ::1/128 scope host 
    inet 127.0.0.1/8 scope host 
2: vd0: <BROADCAST> mtu 1500 
    link/ether 02:02:6e:b0:ef:06 brd ff:ff:ff:ff:ff:ff
$ mstack /dev/net/newstack ip link set vd0 up
                         #turn on the vde interface
$ mstack /dev/net/newstack /sbin/udhcpc -i vd0 -q -s ~/etc/udhcpc/default.script
udhcpc (v0.9.9-pre) started
Sending discover...
Sending select for 10.16.31.32...
Lease of 10.16.31.32 obtained, lease time 600
adding dns 10.16.200.1
$                        # now /dev/net/newstack is configured
$ firefox                # runs on the standard stack
$ mstack /dev/net/newstack firefox
                         # runs on the other stack
$ mstack /dev/net/newstack xterm
                         # the shell in xterm will have newstack as its default 
stack

With a proper header file it is possible to write/compile and run inside umview 
programs 
using msockets and accessing several stacks at the same time.

umview is included in Debian.

(*) "mount" is the View-OS/umview way to define virtual entities. 
With different modules it is possible to virtualize file systems (umfuse), 
devices(umdev),
emulators for alien binaries/scripts (ummisc), time/users/ etc...
The "stack" special file might be created in other ways in a future 
implementation
of msockets in the linux kernel.

Please note that the standard file system access mode/ACL can be set for the 
stack
special file to define the permissions on the stack.
It is possible to create a multiuser operating system where each user has 
his/her own
stack, his/her own ip address, routing etc. (in a simple and natural way, not
by lots of iptables or selinux rules).

> I notice that the name "msocket" is also used by MATLAB (see
> https://www.ohloh.net/p/msocket) ... I assume there is no relationship?
Yes, the two concepts are not related in any way.

renzo

<Prev in Thread] Current Thread [Next in Thread>