3 ms·
I 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 starti
by fulafel 9y ago
I 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.
- lmm 9y ago> A difference here is that there is already an easy and widely supported and understood system for this restriction for the process case. There is? I see a bunch of ad-hoc, retrofitted efforts, which seem to be constantly playing whack-a-mole in terms of what they forgot to restrict. > And processes are easier to debug, instrument, monitor and manage. Yes and no. The kernel/process boundary can make debugging and profiling much harder when you need to do so across it. With a lot of unikernels you can run the whole thing as a userspace process for development purposes and debug/profile without worrying about that. And these days we have a lot of good tooling for monitoring and managing VMs. > 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. That's what I meant. If you have a mixed deployment of legacy components and new-style components, that approach lets you realise the benefits quicker for the new-style pieces and ensure there's an incentive to move components into the new style. Whereas if you just run a bunch of processes, then no single component can benefit from isolation until you've ported everything.
- fulafel 9y agoseccomp does not imply a whack-a-mole type of effort: you can have a very small whitelist of syscalls, and further restrict their parameters. The debugging would be similar with a unikernel run as a seccomp process: you could debug it as a single process. I believe the BSD rump kernel is already used like this for debugging purpouses. If you want to mix legacy processes and unikernels in parallel, you would still run the legacy processes on a different VM in the seccomp case.