4 ms·
You can write proprietary kernel drivers. Why can't you link user code with kernel? User code usually depends on POSIX interface and Linux is just one of the im
by vbezhenar 7y ago
You can write proprietary kernel drivers. Why can't you link user code with kernel? User code usually depends on POSIX interface and Linux is just one of the implementations.
- masklinn 7y ago> You can write proprietary kernel drivers. IIRC you can write proprietary kernel modules, which are loaded at runtime. > Why can't you link user code with kernel? User code usually depends on POSIX interface and Linux is just one of the implementations. Because the kernel is licensed under GPLv2. If you statically link to the kernel, then all interpretations of the GPL are that your work is a derivation and must be GPL'd (at least assuming it is "distributed").
- nabla9 7y agoLinux is licensed under GPL-2.0 WITH Linux-syscall-note. >NOTE! This copyright does not cover user programs that use kernel services by normal system calls - this is merely considered normal use of the kernel, and does not fall under the heading of "derived work". (even without actual syscall, you can consider unikernels as normal use of kernel)
- masklinn 7y agoThe original comment specifically put forward the following scenario: > Unikernels are typically statically linked. The note you're quoting is about regular software performing regular syscalls which is runtime dynamic linking to the kernel (so much so that multiple OS (e.g. SmartOS, Windows) implemented linux persona which allow running unmodified Linux software against a non-linux kernel). It does not apply in a scenario where you would statically link to the kernel.
- nabla9 7y ago> It does not apply in a scenario where you would statically link to the kernel. That's not the interpretation everyone else uses.
- masklinn 6y agoThat's completely irrelevant to this discussion. It's a well-defined axiom of the original comment, and we're discussing logical consequences of that axiom. If you want to disagree with the original axiom then go and do so to the original comment.
- vbezhenar 7y agoSo if your "userspace" payload is dynamically linked and loaded at runtime, it's no longer a problem? I don't think that there is a big performance hit for dynamic loading. Probably something like LTO won't work.