|
|
Subscribe / Log in / New account

Being honest with MODULE_LICENSE

MODULE_LICENSE() is a macro which allows loadable kernel modules to declare their license to the world. Its purpose is to let the kernel developers know when a non-free module has been inserted into a given kernel. If you submit an oops report showing a "tainted" kernel, chances you will be asked to reproduce the problem without the proprietary module loaded, or to talk to that module's vendor about the problem. In general, the kernel hackers want to hear about problems, but their interest drops remarkably when they cannot get at the source to diagnose or fix the problem.

The declared module license is also used to decide whether a given module can have access to the small number of "GPL-only" symbols in the kernel.

There is no central authority which checks license declarations; it is assumed that module authors will not want to lie about the license they are using. That assumption has generally proved to be valid, so people were surprised when Linuxant was found to have put a false module declaration into its binary-only "linmodem" driver. Or, if it's not false, it does cleverly manage to not tell the whole story.

The actual license string in the Linuxant driver reads:

GPL\0for files in the "GPL" directory; for others, only LICENSE file applies

The \0 is an ASCII NUL character, which, in C programs, terminates a string. Thus, while the above declaration would appear fairly clear to human eyes, the kernel only sees a license declaration of "GPL".

One might well wonder why Linuxant chose to do this. The driver in question does not use any GPL-only symbols, so it is not an attempt to get around the kernel's simplistic access control mechanism. According to Linuxant president Marc Boucher, they simply wanted to avoid bothering users with kernel warnings:

The purpose of the workaround is to avoid repetitive warning messages generated when multiple modules belonging to a single logical "driver" are loaded (even when a module is only probed but not used due to the hardware not being present). Although the issue may sound trivial/harmless to people on the lkml, it was a frequent cause of confusion for the average person.

Most developers seem to have taken this explanation at face value, though some remain unhappy about the approach that was used. Possible solutions include putting the "kernel tainted" warning in the system logfile only, simply suppressing the warning after the first time, or having the Linuxant drivers manually set the "tainted" flag themselves at load time. Finding a way to achieve Linuxant's aim (provide a driver which enables hardware that does not otherwise work with Linux while avoiding upsetting users with lots of scary messages) should not be that hard to do.

Meanwhile, of course, there is also interest in making it harder for others to get past the kernel license check. Carl-Daniel Hailfinger, who originally pointed out the problem, also submitted a patch which would explicitly "blacklist" modules from Linuxant; any such module would taint the kernel regardless of its claimed license. Linus suggested that the license be stored as a counted string as a way of defeating the "NUL attack." Rusty Russell, instead, noted that any check that would be accepted into the kernel can be defeated by an even moderately motivated attacker. His patch includes a quick compile-time check to defeat Linuxant's technique, but it explicitly avoids getting into a real arms race with potential violators.

Chances are we will see this sort of behavior again - with, perhaps, a less benign intent. The nature of a free kernel makes it hard to shut out those who are unwilling to play by the rules. But, as Linus said:

...playing the above kinds of games makes it pretty clear to everybody that any infringement was done wilfully. They should be talking to their lawyers about things like that.

Given that a number of free software hackers are increasingly unwilling to see their licenses ignored, anybody who wants to engage in this sort of behavior should, indeed, be talking to their lawyers.

Index entries for this article
KernelModules/Licensing
KernelTainting


(Log in to post comments)

That "GPL" directory

Posted Apr 28, 2004 16:36 UTC (Wed) by rfunk (subscriber, #4054) [Link]

The real kicker here is that the GPL directory mentioned is empty!

That "GPL" directory

Posted Apr 28, 2004 22:23 UTC (Wed) by dlang (guest, #313) [Link]

this is being disputed, in at least some packages there is code in the GPL directory, but in at least one RPM (Suse, IIRC) the directory is empty.

it's hard to say that this is the fault of Linspire, it looks like someone at Suse goofed when packaging the source RPM.

Linspire? SuSE? What are you on about?

Posted Apr 29, 2004 5:15 UTC (Thu) by ctg (guest, #3459) [Link]

Linuxant make the product. Linuxant make the packages. They have packages for various distributions - Linspire isn't even one of those, although the SuSE one is.

I think your brain is leaking prejudice.

Linspire? SuSE? What are you on about?

Posted Apr 29, 2004 6:20 UTC (Thu) by dlang (guest, #313) [Link]

yes, I was misremembering the company name, my apologies to both companies

That "GPL" directory

Posted Apr 28, 2004 22:26 UTC (Wed) by dlang (guest, #313) [Link]

also the code that isn't covered by the GPL is the code to implement the various communications protocols in the winmodems, this code is very definantly not a derivitive of the linux kernel (as the authors of the code in question have chosen to never support linux), but is only sold under license by linspire to allow their customers to use their modems.

Being honest with MODULE_LICENSE - how was the license srtring read?

Posted Apr 28, 2004 16:38 UTC (Wed) by parimi (guest, #5773) [Link]

I am curious to know how the license string

GPL\0for files in the "GPL" directory; for others, only LICENSE file applies

within a binary module was read? My first guess would be the strings command..

Being honest with MODULE_LICENSE - how was the license srtring read?

Posted Apr 28, 2004 16:49 UTC (Wed) by dvrabel (subscriber, #9500) [Link]

It's in the glue source code.

Being honest with MODULE_LICENSE - how was the license srtring read?

Posted Apr 28, 2004 18:45 UTC (Wed) by proski (subscriber, #104) [Link]

modinfo (module-init-tools version 3.0) would print "GPL". I checked it on a different module by changing its MODULE_LICENSE. modinfo is the standard way to display module information, unlike strings.

Being honest with MODULE_LICENSE - how was the license srtring read?

Posted May 1, 2004 0:37 UTC (Sat) by giraffedata (guest, #1954) [Link]

I think this point is key to the issue. Linuxant's trick is clever, but silly. It would have the same legal and technical effect to do it this way:
MODULE_LICENSE("GPL"); // not really, this just shuts up confusing messages

If a court would find that a user is entitled to consider the output of modinfo (or equivalent) to be a complete offer of a license, then both this and Linuxant's clever trick require Linuxant to grant a GPL license. If not, then it makes no difference legally what the argument of MODULE_LICENSE() is.

Being honest with MODULE_LICENSE

Posted Apr 28, 2004 16:52 UTC (Wed) by rknop (guest, #66) [Link]

Although the issue may sound trivial/harmless to people on the lkml, it was a frequent cause of confusion for the average person.

This is a good thing. There is a real danger of Linux working too cleanly and easily for the common user with proprietary kernel modules and with hardware that can't be supported by free software. Specifically, the drive to have any open-source supported hardware goes away. We've already basically got this with video cards; as far as I can tell, no video card manufacturer is supplying programming information any more. Rather, any recent video card requires proprietary drivers if you want to use 3d acceleration. (Somebody please prove me wrong.) The fact that so many distributions make it easy to do this means that only the fanatics like me and kernel developers notice any more.

If we can use licensing requirements to at least let the people who otherwise wouldn't notice realize that they're making a compromise, it might help avoid, or at least slow, completely damping out the motivation for there to be open source drivers for hardware.

-Rob

Being honest with MODULE_LICENSE

Posted May 10, 2004 17:30 UTC (Mon) by elanthis (guest, #6227) [Link]

"There is a real danger of Linux working too cleanly and easily for the common user"

That comment (yes, taken out of context) is pretty much exactly how many users, administrators, and developers already see Linux, thanks entirely the fact that it is already so hard to use proprietary drivers, and in fact even most Open Source drivers. The fact that any driver not distributed with the kernel itself is very difficult to use, thanks entirely to constantly changing ABI and API, makes it very difficult to just use new hardware. The only way to get things to work is to upgrade the kernel or the local driver source.

Most Linux drivers aren't available separately from the kernel release cycle, so in fact your only option with Open Source drivers is to upgrade the kernel, re-apply any local patches, rebuilding initrd images, reinstall any proprietary drivers, update the boot loader, etc. Again, for absolutely no good reason.

Using _any_ hardware, no matter the driver, is a pita on Linux, and will continue to be so until the kernel offers (at the very least) a stable API across the same release series (and preferably backwards compatibility across the major release serieis). A stable ABI would make life even easier. Again, this isn't just proprietary drivers, it's also affecting Open Source drivers.

Being honest with MODULE_LICENSE

Posted Jun 22, 2021 18:10 UTC (Tue) by scientes (guest, #83068) [Link]

While a stable ABI is non-sense, it would be nice if Linux wasn't such a security mess and could put its drivers is user-space.

Being honest with MODULE_LICENSE

Posted Jun 22, 2021 19:40 UTC (Tue) by Wol (subscriber, #4433) [Link]

What be even nicer is if OS's *in general* took advantage of the cpu's ring mechanism. I think I've got it the right way round, the OS runs in privileged ring 0 mode, and userspace runs in unprivileged ring 3.

That gives us unused rings 1 and 2, and I would have thought that's the perfect place for drivers and all that stuff. Or is the problem like that with micro-kernels - the context switch is just too expensive?

Cheers,
Wol

Being honest with MODULE_LICENSE

Posted Jun 23, 2021 4:28 UTC (Wed) by mjg59 (subscriber, #23239) [Link]

1) Many CPUs just have a user/supervisor split rather than multiple rings
2) Even on x86, you can't set page access at a finer grain than "available to ring 3" and "not available to ring 3" - anything running in rings 1 or 2 can scribble over any RAM that's in their page tables, so the meaningful benefit is marginal. The only way to have more granularity is to use segments instead of pages, and segments don't really exist in 64-bit mode, so. I guess in theory you could have ring 0 code load a different set of page tables whenever it transitions to ring 1 code, and then have ring 1 trigger a special syscall or whatever to indicate that it was done and could transition back to ring 0, but the overhead of that sounds like it'd be large?

Being honest with MODULE_LICENSE

Posted Apr 28, 2004 16:55 UTC (Wed) by JoeBuck (subscriber, #2330) [Link]

Someone send them a copy of the DMCA, with suitable highlighting of "No person shall circumvent a technological measure that effectively controls access to a work protected under this title" and "shall be fined not more than $500,000 or imprisoned for not more than 5 years, or both, for the first offense".

Being honest with MODULE_LICENSE

Posted Jun 22, 2021 18:11 UTC (Tue) by scientes (guest, #83068) [Link]

The fact that nobody is doing that shows that these laws are only written to rubber-tar-and-feather people, and that that purpose of them has sunk in.

Being honest with MODULE_LICENSE

Posted Apr 28, 2004 20:20 UTC (Wed) by rjamestaylor (guest, #339) [Link]

Well, dammit. I previously noted in this domain that I am using Linuxant's Windows binary driver wrapper to utilize my WiFi hardware I purchased from Dell, which they purchased from Broadcom, which they acquired from whoever they acquired... I knew the driver was a binary, obviously, but didn't think that license deception was being committed. While my Dell is off being repaired (again) for a bad motherboard (again) I can't do anything about this, but I will definitely request a refund from Linuxant and remove the driver loader from my system. Then I'll head over to SourceForge and check out the Open Source project trying to accomplish the same thing. If I can't make it work, I'll stick a PCMCIA 802.11b card in the PCMCIA slot -- and avoid that gnawing feeling in my gut.

They say "it's for the customer" but what they mean is "if we played by the rules the customer would be annoyed and we'd lose money." The "rules" are simple to follow: tell the truth. If the tainted alerts are too annoying to bear, then release your damn product GPL or withhold it and let humanity suffer. Whatever.

Look it -- how would Linuxant feel if I made a quick hack to get around their MAC address/license registration scheme so my friends and family could pay me $5 each to use my binary-wrapper-wrapper on their computers without annoying "registration" alerts and disablment? I bet Linuxant would be pretty indignant -- "How dare you take money from me? You must pay the license fee for using this software solution!" Oh yeah? Well, to benefit from the work of the Linux kernel developers you need to honor their license, too.

Creepy. Hypocritical. Wrong.

Being honest with MODULE_LICENSE

Posted Apr 28, 2004 22:26 UTC (Wed) by proski (subscriber, #104) [Link]

The free replacement is http://ndiswrapper.sourceforge.net/

But it looks like LinuxAnt has fixed the problem in the latest drivers. driverloader-1.66_k2.4.22_1.2188.nptl-1fdr.athlon.rpm.zip doesn't lie about its license.

$ modinfo driverloader.o 
kernel_version: 2.4.22-1.2188.nptl
using_checksums:1
author:         Copyright (C) 2003-2004 Linuxant inc.
description:    Linuxant DriverLoader for Wireless LAN devices
license:        see LICENSE file; Copyright (c)2003-2004 Linuxant inc.
kernel_version: 2.4.22-1.2188.nptl

Being honest with MODULE_LICENSE

Posted Apr 29, 2004 1:47 UTC (Thu) by farnz (subscriber, #17727) [Link]

DriverLoader has always been honest about its licence; LinuxAnt's "objection" to the taint for their modem driver is that it "confuses" customers if each module that the driver loads causes a taint message to appear. So, one taint message is OK, but several messages is trouble.

Personally, I feel LinuxAnt are being unnecessarily underhand; it would have been just as effective to ask the developer of modutils to provide a method to warn once for a sequence of module insertions done by modprobe. In other words, if I call "modprobe foo; modprobe bar", where both are tainted, I get two taint messages. If I call "modprobe --error-on-fail foo --no-error-on-fail bar baz biff" where all 4 modules are tainted, modprobe prints one taint message for all four modules, inserts foo or fails, and then tries to insert bar, baz and biff, not worrying if any of them fail to insert due to lack of hardware.

This fits what they claim to want to do, but avoids annoying kernel developers too much. It also ensures that oops output remains tainted, which the current solution doesn't.

Thank you for correction!

Posted Apr 29, 2004 2:09 UTC (Thu) by proski (subscriber, #104) [Link]

Sorry, I wrongly assumed that rjamestaylor checked the facts before uttering his tirade.

Thank you for reading!

Posted Apr 29, 2004 2:23 UTC (Thu) by rjamestaylor (guest, #339) [Link]

Eh, huh?

I noticed your previous post went off about "DriverLoader", which I didn't understand as I'm not familiar with it, but I never meant to refer to that package in the first place. In fact, the context of my "tirade" was Linuxant, not DriverLoader; nor do I mention DriverLoader or driverloader. Though I may have thrown you off with general descriptive language:

but I will definitely request a refund from Linuxant and remove the driver loader from my system.
In my non-kernel hacker mind, Linuxant is loading the Windows binary driver into Linux for me to use. That's what I meant. That there is a package/utility called DriverLoader...well, I assumed you would exercise reading comprehension skills before jumping to wild conclusions from an insignificant phrase that would have to be taken out of context not only of the post but of the very sentence in which the phrase exists.

Thanks for playing!

NB

Posted Apr 29, 2004 2:26 UTC (Thu) by rjamestaylor (guest, #339) [Link]

(NB: that "retort" was meant as self-deprecating ironic humor to anyone who didn't get it :)

I got confused too initially

Posted Apr 29, 2004 2:34 UTC (Thu) by farnz (subscriber, #17727) [Link]

When I first heard about the LinuxAnt fuss, I also wrongly assumed that it was both DriverLoader and the Conexant modem stuff (having taken care to ensure that there are free drivers for all hardware in this machine). I still agree with rjamestaylor; LinuxAnt should be penalised by people who care about freedom of software for trying to bypass the usual rules, whether or not their intent was honourable.

I know this isn't Slashdot, and thus I'm probably preaching to the choir, but I don't feel that anything that helps Linux adoption is always beneficial. Part of the point of Linux for me is that it's free software in RMS's sense, and as such, people who for whatever reason do not wish to keep to the freedom side of things deserve penalising. The rules exist that allow you to co-exist adequately with those of us who don't buy devices that require binary-only drivers, and if you start bypassing them, I'm going to be unhappy.

My personal setup includes machines of 4 different processor architectures; I have both 64 and 32 bit systems, with both little and big endian byte orders. If I install free software on one, I know that it'll work on the others, provided I'm prepared to debug it. I like to have it made clear to me when I'm installing non-free software, so that I know that it may not work on any other machine I posess. LinuxAnt's trick has potential to confuse me if I'm not careful and rely on kernel tainting to spot non-free drivers, and for that reason I feel they are morally in the wrong.


Copyright © 2004, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds