Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

(Not the author) No, the paper describes a small patch to Linux (~20 lines) + modifications to glibc that enable using Linux as a unikernel. Their goal is to have the modifications upstreamed so that Unikernel linux could be a GCC target etc.


I also don't get it. "Linux as a unikernel" does not make sense. The entire point of a unikernel is to not have the OS in every container/VM.


The crucial part of the paper is that they:

• Added a new kernel configuration option to allow theuser to select if he/she wants to compile the Linux kernel as UKL.

• Added a call to an undefined symbol (protected by an #ifdef) that can be used to invoke application code rather than creating the first userspace process.

• Created a small UKL library which has stubs for syscalls. These stubs hide the details of invoking the required kernel functionality now that the regular interface (i.e.,the syscall instruction) is no longer used.

• Changed glibc so that instead of making syscalls into the kernel, it makes function calls into UKL library.

• Changed the kernel linker script to define new segments such as thread local storage (TLS) segments which are present in application ELF binaries.

• Added a small amount of initialization code before invoking the application to replace initialization normally done by user level code, e.g., for network inter-face initialization.

• Modified the kernel linking stage to include the application code, glibc and UKL library to create a single binary.

Basically, I think the idea is you get all the linux syscalls (+ filesystems... + network stack... + hardware support... + everything) for 'free'. Sure you'll have a pretty large binary, but you won't have to write anything.


Thank you! That great summary should be the top post.


I did copy the dot points directly from the paper. It was behind a university login for me, so I wasn’t sure anyone could read it.


If you statically link your software with the kernel, presumably an optimizing compiler will be able to remove most of the kernel from the resulting binary.


Yes. Also LTO becomes possible.


For those, like me, who don't know what the acronym LTO is: it's Link-time optimisation, the stage during compilation where the "linker" has all of the object files which make up your program available to it, and is therefor able to optimise across the entire program at once (instead of the individual constituent source files which make up the program).

There's a long, detailed PDF about LTO produced by GCC which was useful in helping me to understand exactly how this works here: https://gcc.gnu.org/projects/lto/lto.pdf




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: