Good afternoon, Jeff,
On Mon, 13 Mar 2000, Jeff Dike wrote:
> My current umn network driver uses slip as the kernel-to-user communications
> mechanism. I'm unhappy with this for two reasons:
> - the slip device needs to be ifconfig-ed, which means that either the kernel
> needs to be run as root, or there needs to be a setuid ifconfig available
> (i.e. um_ifconfig).
Agreed. Are Linux capabilities functional enough that one could
add CAP_NET_ADMIN to the uml-kernel file? I suspect administrators would
be much happier typing "set_pcap +netadmin ./linux" than "chmod 4755
./linux".
> - there is no obvious way to configure both ends (especially the host end) of
> the channel from the boot scripts.
>
> I don't see that using ethertap helps either of these. /dev/tap* still needs
> to be ifconfig-ed, which still needs root privs somehow. And using a
> different communications mechanism to the hosting kernel doesn't seem to
> change the problem of getting the host end ip address into the driver from the
> networking layer above it.
>
> Is this right? Are there any advantages to using ethertap that I've
> overlooked?
The ethertap could be brought up once during host system boot and
left until uml-linux is started. Just for example: Boot scripts bring up
tap0 w/ 192.168.0.254, ptp -> 192.168.0.253, and add a route to .253.
/dev/tap0 is given mode 660, owned by root/uml-group.
tap0 just sits there until someone in uml-group start up uml with:
./linux tap=192.168.0.253,/dev/tap0
at which point uml-linux assigns .253 to its internal tap0, opens
/dev/tap0 on the host filesystem as a normal file for read-write (perhaps
locking it to avoid accidental opens by two uml's), and shuffles bytes
back and forth from its own /dev/tap0 to the host /dev/tap0.
In fact, if I replace
route add -host 192.168.0.254 dev umn
route add default gw 192.168.0.254
in the newly submitted 0.0.6 howto with
route add default dev umn
, uml doesn't even have to know what IP is on the other end of the
tap-tap link.
The right to access host networking is now down to whether ./linux
is able to read and write to a preconfigured /dev/tap0. Is that a more
elegant approach?
Cheers,
- Bill
---------------------------------------------------------------------------
Q: Will the tcp/ethernet SMP scaling changes be back-ported to 2.2.x?
Mingo: yes, all SMP changes in 2.3 will be backported to 2.2 in the
next few months, but to not confuse it with 2.2 it will be named '2.4' ;)
-- Ingo Molnar <mi...@ch...>
--------------------------------------------------------------------------
William Stearns (wst...@po...). Mason, Buildkernel, named2hosts,
and ipfwadm2ipchains are at: http://www.pobox.com/~wstearns
LinuxMonth; articles for Linux Enthusiasts! http://www.linuxmonth.com
--------------------------------------------------------------------------
|