This article is more than 1 year old

Wrap it before you tap it? No, say Linux developers: 'GPL condom' for Nvidia driver is laughed out of the kernel

Facebook's man told: 'OK, now you are just trolling us'

Linux devs have dismissed a proposed patch to the kernel that would only work with a Nvidia driver, motivating a second patch that will prevent disguised use of proprietary code in GPL modules.

The Linux Kernel licensing rules make provision for proprietary third-party modules but state that they must be tagged as such.

This "cannot be used for modules with source code in the kernel tree. Modules tagged that way are tainting the kernel with the 'P' flag when loaded and the kernel module loader refuses to link such modules against symbols which are exported with EXPORT_SYMBOL_GPL()."

Facebook developer Jonathan Lemon put forward an RFC (Request for Comments) on a proposal to implement DMA (Direct Memory Access) zero-copy between a network card and a GPU to enhance network performance, while keeping the protocol processing on the CPU. The use case is for "GPUs used for machine learning, which are located near the NICs, and have a high bandwidth PCI connection between the GPU/NIC," states the RFC.

The code relies on Nvidia's proprietary driver for Linux, noticed by kernel maintainer Greg Kroah-Hartman, who observed: "OK, now you are just trolling us. Nice job, I shouldn't have read the previous patches. Please, go get a lawyer to sign-off on this patch, with their corporate email address on it. That's the only way we could possibly consider something like this."

Long-term Linux and free software developer Christoph Hellwig agreed, accusing Lemon of working around the requirement for EXPORT_SYMBOL_GPL. "If you only even considered this is something reasonable to do you should not be anywhere near Linux kernel development," he said.

Lemon said: "While the current GPU utilized is Nvidia, there's nothing in the rest of the patches specific to Nvidia – an Intel or AMD GPU interface could be equally workable," but others were unconvinced, arguing that the proposed code was written specifically for the Nvidia API.

"We can't do a good job if our hands are tied by being unable to change something. This is really a textbook example of why this is the correct philosophy," said Jason Gunthorpe, who works at Nvidia following the acquisition of his former company Mellanox. "Posting patches so tightly coupled to the Nvidia GPU implementation just makes people angry," he said.

The spat prompted Hellwig to propose a patch to "Inherit TAINT_PROPRIETARY_MODULE". Hellwig said: "We've had a bug in our resolution of _GPL modules since day one, that is a module can claim to be GPL licensed and use _GPL exports, while it also depends on symbols from non-GPL modules. This is used as a circumvention of the _GPL exports by using a small shim module using the _GPL exports and the other functionality."

The proposed patch is to ensure that "if a TAINT_PROPRIETARY_MODULE exports symbol, inherit the taint flag for all modules importing these symbols, and don't allow loading symbols from TAINT_PROPRIETARY_MODULE modules if the module previously imported gplonly symbols. Add anti-circumvention devices so people don't accidentally get themselves into trouble this way."

"Ah," said Kroah-Hartman, "the proven-to-be-illegal 'GPL Condom' defense."

Hat tip to Michael Larabel, who reported the incident on his Phoronix site. ®

More about

TIP US OFF

Send us news


Other stories you might like