3 ms·
In which case something like seccomp is a better vessel for these programs? VM interfaces have lots of surface area.
by fulafel 9y ago
In which case something like seccomp is a better vessel for these programs? VM interfaces have lots of surface area.
- lmm 9y agoQuite the opposite. The Unix userland <-> kernel and IPC interfaces are enormous: hundreds of system calls, often overlapping, a dozen different socket types, multiple different kinds of magic filesystem interfaces (some of which take complex datastructures in arbitrary unstandardized text formats)... Whereas the interface between a VM and its host is pretty small.
- fulafel 9y agoseccomp is a Linux system for restricting a process to a small # of syscalls.
- lmm 9y agoSure, but the set you'd restrict to would look rather like the VM interfaces, only more awkward because it's had to be retrofitted on to what already exists, and often more permissive than it should be because a library assumes all syscalls are available (why would it not?)
- fulafel 9y agoThe virtualized hardware interfaces also enormous. And more cumbersome to restrict than seccomp, and more cumbersome to use than syscalls. I'm not sure I follow the logic in your harder-to-retrofit opinion. In unikernels the central idea is retrofitting the unikernel around the host interface and the application. It seems obvious to me that this would be more easier to develop and debug inside a standard process, than an emulation of bare iron, even if you would have to call it a different platform due to a radically smaller syscall interface.
- lmm 9y ago> The virtualized hardware interfaces also enormous. I don't see that they have to be? There's no reason for the host to offer e.g. a virtualized graphics card except to unikernels that specifically want to output graphics. > In unikernels the central idea is retrofitting the unikernel around the host interface and the application. I don't think I follow? The only part that's retrofitted is using an interface that was designed to host OSes to instead host an application, but it's a good fit because virtualized guests haven't been treated as trusted (particularly not in contexts like AWS), whereas for decades of unix history any local process was treated as more-or-less trusted. > It seems obvious to me that this would be more easier to develop and debug inside a standard process, than an emulation of bare iron, even if you would have to call it a different platform due to a radically smaller syscall interface. If we're talking about creating a new platform with a restrictive, strictly secured syscall interface, whether we talk about a hypervisor running unikernels or a kernel running processes is pretty much just terminology. I would think the actual interface specification would end up very similar to the current hypervisor/unikernel one. The big advantage of keeping compatible with existing VMs is to provide a way to run legacy processes without compromising the security of new-style ones (and while making sure the incentives in terms of e.g. performance run in the right direction). If one component of your system needs to be run as a traditional unix process, that's fine - it gets its own VM in which it's running a traditional kernel and the actual process - but it can't interfere directly with your other components, and it pays for its own overheads.
- fulafel 9y agoI agree that VM interfaces don't have to be big, but they are by default just like the syscall one is. This argument was just to set the two at a similar starting point. Historically Unix processes and VM guests have both been treated as untrusted on paper, but with not much scrutiny. There are frequent VM breakout vulnerabilities announced and there's wide agreement that this is a porous security boundary. The numbers are probably better for the VM interface, but it's in the same category. Apparently we agree that in terms of exposed functionality, the end result is not going to be very different, if we restrict the VM interface vs use seccomp or similar. A difference here is that there is already an easy and widely supported and understood system for this restriction for the process case. And processes are easier to debug, instrument, monitor and manage. And they don't require platform support for virtualization, which can be useful on eg embedded platforms, phone apps etc. For the last point about running legacy processes, maybe we have a different understanding of what Unikernels are. If you have an unikernel application that uses a Rump kernel or MirageOS, you are not going to be able to run legacy processes in the Unikernel container in any case, there is not even going to be a kernel/userspace boundary. There is just one code image with everyting linked into it. So the traditional VM interface is not going to help with the legacy processes. If you were talking about running regular VMs for legacy apps alongside unikernel images, then that's of course valid, but I don't agree that this is an argument for using the VM interface for unikernel images.