I'm writing a userspace driver which requires some modifications to the Linux kernel to function. The modifications expose new functionality by the sysfs interface. I understand that the modifications to the Linux kernel have to be licensed under the GPLv2, but is the userspace software (which relies on the modified kernel to function) considered a derivative work of the kernel?

  • I think this is just a case of two separate programs on the same computer. Of course, if you distribute your kernel modifications you must publish the source code to them, but you should be able to license the driver under whatever you want. – EMBLEM Jul 13 '16 at 23:15
  • @EMBLEM I guess what I'm worried about is that, since the program requires the kernel modifications, they might be considered a single work for the purposes of the GPL. – g.rocket Jul 14 '16 at 0:05
  • "I guess what I'm worried about is that, since the program requires the kernel modifications, they might be considered a single work for the purposes of the GPL." --> my take and I have quite a bit of experience in that domain is that it depends: what is the new functionality you expose sysfs? – Philippe Ombredanne Jul 18 '16 at 5:20
  • @PhilippeOmbredanne The kernel driver exposes a very low-level interface to a hardware device, basically translating sysfs read/writes into SPI commands and keeping a FIFO full/empty. The userspace program interacts with the sysfs interface to expose a higher-level interface to access the hardware device. – g.rocket Jul 18 '16 at 14:49
  • This looks to me as a bona-fide use case then. And in which @MadHatter response would apply – Philippe Ombredanne Jul 19 '16 at 15:10

Your kernel modifications pretty clearly create a derived work of the kernel, so they will almost certainly need to be distributed under GPLv2. In addition, deciding to do so helps the analysis in the next paragraph enormously.

As for your userspace software, it is certain that proprietary software, public domain software, and other non-GPL'ed software makes use of the regular kernel all the time without being covered by the kernel's licence. Since that is true for a GPL'ed, stock kernel, it will also be true for your modified, GPL'ed kernel, because it is the same licence that covers both works. I believe that your userspace software can be distributed under any licence you choose.

  • +1; To put it another way: if your modified kernel became the mainline kernel (because Linus decided to pull your changes in), the project's decision to include your changes (or not) doesn't alter your legal rights or responsibilities in any way. Thus, using your own modified kernel is the same as using the mainline kernel. As stated here, there is a strong longstanding precedent that kernel licensing does not impact userspace licensing. – apsillers Jul 14 '16 at 15:20
  • Yes, I think that's another way of looking at it. Hopefully it is a better way, at least for some! – MadHatter Jul 14 '16 at 15:36
  • Your answer generally makes sense BUT if the kernel changes in questions are significant enough it could be that the user space code could be impacted too. Creating "non-standard" interfaces to the kernel could be such a grey area. – Philippe Ombredanne Jul 18 '16 at 5:18
  • @PhilippeOmbredanne I tend to side with apsillers point above that there is a strong, longstanding precedent that kernel licensing does not [bleed] into userspace, and that the GNU GPL's obligations are met by sharing your kernel code, and thus your non-standard interfaces, with everyone. Could you provide a counter-example, where other changes-of-sufficient-significance have engaged such a bleed, and required userspace-only code also to be GPLed? – MadHatter Jul 18 '16 at 6:20
  • For an unmodified kernel, licensing "does not bleed" into userspace as you put it. But some mods could bleed in userspace. For instance, say you create a simple hook module that would expose network packets in userspace and allow to do packet filtering in userspace when you would have to do it using kernel space code otherwise. Several lawyers I have consulted with would consider that userspace code using this newly added funky kernel facility would have to be licensed under the same terms of the kernel proper. – Philippe Ombredanne Jul 19 '16 at 15:23

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.