News for hackers. Stuff that matters.
Re:LibOS – A library operating system for Linux by ufo on Tuesday March 24, 2015 @08:00PM (#9260437)
Stupid question: why does the Linux Kernel handle the networking in the first place? Why not implement everything in userspace from the start?
Re:LibOS – A library operating system for Linux by ori_b on Tuesday March 24, 2015 @08:07PM (#9260463)
For a number of reasons:

- It used to be impossible to implement securely. Until very recently, there was no hardware support for virtualizing the network buffers, which would mean emulating the network hardware in userspace. This would be very slow.

- Because even today, many devices don't have the required hardware virtualization support. For example, many (most?) ARM devices. If you give direct DMA access, you might be allowing anyone to splatter whatever code they want across whatever memory they want.

- Without kernel arbitration of some sort, there's no way to do load balancing across services, throttle, or firewall effectively.

- The kernel is designed to provide a uniform interface for all programs to the hardware. Putting networking in userspace gets rid of this abstraction, and means that every program has to be aware of the network hardware; software that works with file descriptors directly can't use the same abstraction for files and network.

- Because there are no hardware limitations on the amount of multiplexing. I don't remember how much muxing various hardware supports, but hardware has limits for this sort of thing. If you want more than N processes using the virtual network, you might be SOL with a virtualized userspace network stack.

Re:LibOS – A library operating system for Linux by vidarh on Wednesday March 25, 2015 @08:22AM (#9262425)
These are valid objections to in-process access to the networking hardware. Not to running the networking stack in user space, in a privileged process.

For the latter, performance concerns would be a bigger issue.

Re:LibOS – A library operating system for Linux by yitzhakbg on Wednesday April 01, 2015 @03:48PM (#9306317)
Not a stupid question at all. It's kind of like the question why did we have to program computers in Assembler (which was great fun, BTW) and not in high level languages. It wasn't feasible. Assembly coding did continue for quite some time in the interest of performance but once the proverbial turn is taken, there is no looking back. That's where networking is now. What we still call (rigid) "protocols" should and indeed can become freestanding application code See my paper "Tearing Down the Protocol Wall" at https://www.linkedin.com/in/yitzhakbg#background-publication...
Re:LibOS – A library operating system for Linux by thehajime on Wednesday March 25, 2015 @11:26AM (#9263541)
I like the following interview.

"One could start arguing about it from the historical viewpoint where network packet creation was a holy operation."

https://fosdem.org/2015/interviews/2015-antti-kantee/

Re:LibOS – A library operating system for Linux by justincormack on Tuesday March 24, 2015 @08:08PM (#9260465)
To multiplex multiple users and applications. Which is less necessary in these days of virtual network devices etc, eg SR-IOV can make a PCI device appear as say 64 network devices so every application can have its own.