LWN.net Logo

invalidate_mmap_range() again

The question of whether invalidate_mmap_range() should be exported to non-GPL modules was discussed here last week. There still has been no (public) resolution of the question as of this writing, but the discussion has progressed somewhat. This issue may give some hints as to how other export requests may be viewed in the future.

Andrew Morton posted two criteria which should be used in considering the request. The first is: does the export make sense from a technical point of view? In other words, is the ability to clear page table entries which point at the page cache a legitimate feature for filesystems to want? The consensus answer here appears to be "yes"; distributed filesystems, in particular, will need this capability.

Andrew also noted that the technical question really should be the only one that matters. If there is a valid technical reason for filesystems to use that function, it should be exported to them. In the real world, however, a second question must also be considered: is IBM's proprietary GPFS filesystem, being the module driving the proposed export change, a derived product of the kernel or not? Here there is less of a consensus.

IBM's claim is that GPFS was developed under AIX and simply ported to Linux; it is thus an independent development and clearly not derived from the Linux kernel. Critics point to the large, BSD-licensed layer of glue code which is required to make GPFS actually work with Linux; this layer, they say, shows that GPFS does so much messing around with kernel internals (rather than using the existing, exported interface) that it must be a derived product. Interestingly, IBM supporters also point to the large glue layer. If GPFS were truly derived from the kernel, they say, there would be no need for a large impedance-matching layer.

Without access to the GPFS source, it is going to be hard for any independent party to make a real determination on the status of GPFS. In the end, however, somebody is going to have to make a decision anyway. The odds would appear to favor IBM getting what it wants in this case. But a clear message is being sent: the kernel developers are increasingly suspicious of (and hostile to) changes which make life easier for vendors of closed-source modules.


(Log in to post comments)

invalidate_mmap_range() again

Posted Feb 26, 2004 9:02 UTC (Thu) by simlo (subscriber, #10866) [Link]

To me it seems the GPL zealots are using the same arguments against this kind of module as SCO is towards RCU: If it was developped for Linux it is a derivative of Linux and must thus be distributed under GPL. Since RCU was developed for Unix it is a derivative work of Unix and must be treated according to the contract between the Unix licensee and SCO.

I don't know what the lawyers say, but I can't see that a function not contanining any direct code from Linux or Unix can be a derivative work. Only the combination between the function and Linux or Unix can be a derivative work.

invalidate_mmap_range() again

Posted Feb 26, 2004 12:24 UTC (Thu) by ekj (subscriber, #1524) [Link]

There's a fairly fundamental difference;

IBM is going to Linus and saying the equivalent of: "Please make these changes to your code, so that my proprietary kernel-module will work under Linux."

As far as I know, noone has ever approached SCO and asked them to change their code in order to make something or other involving Linux or free software in general possible.

A program that can be compiled and run under any of half a dozen oses is obviously not a derivative of any of them.

A module that is hacked up in a way (with a bsd compatibility layer and whatnot) that it can ONLY work with one spesific OS (Linux) and ONLY if that OS chooses to incorporate changes making the module run is a lot more intimately tied to the OS.

invalidate_mmap_range() again

Posted Feb 26, 2004 12:59 UTC (Thu) by simlo (subscriber, #10866) [Link]

There are morally differences. But even though the interface is changed and the system can only run on Linux the filesystem itself is not anymore a derivative work of Linux than RCU is a derivative of Unix.

Ofcourse Linux + the filesystem is a kind derivative work as if Linux + Nvidia driver. If distributing <Linux>+<Nvidia driver> is legal then is
<your own version of Linux>+<what ever file system module you want to make>.

You can't have legal decitions based on "how integrated it is", "if it was
written for other os'es." It must be either or. And in the end a judge must decide on where the line is.

The decision I would want was that you can do anything to the kernel you want - including changes to the interfaces. You then have to destribute that under GPL. But on that product you can load whatever module you want.
If that can't be seen as within the GPL, no distributing binary modules along with the kernel is within the GPL. I can't see that a judge can decide "in between".

I wish we could have a case going to court such we can get this decided. The worst thing is that we don't know what is what. If it is decided that binary modules isn't ok, we can always make userspace drivers. I am pretty sure that in that case RedHat will put such an interface into their Linux even if Linus wont because people _need_ non-GPL drivers (to have them in userspace would also greatly impact stability.)

IBM's not going to Linus

Posted Feb 27, 2004 16:57 UTC (Fri) by giraffedata (subscriber, #1954) [Link]

IBM is going to Linus and saying the equivalent of: "Please make these changes to your code ...

I need to correct a significant misconception here: IBM is not going to Linus. IBM is going to (the addressee's of Paul McKenney's email) the nebulous Linux kernel community, the nebulous Linux 2.6 kernel community, and Andrew Morton. And it (the Linux kernel) is not Linus' code.

I don't believe it was mentioned in the articles whose decision it was to include the original EXPORT_SYMBOL_GPL into the Linus/Andrew tree or whose decision it was to change it to EXPORT_SYMBOL, or if one or the other other was a complete accident.

invalidate_mmap_range() again

Posted Feb 26, 2004 13:24 UTC (Thu) by ballombe (subscriber, #9523) [Link]

The concerned Linux developers don't claim any right in the GPFS, but in the
Linux+GPFS combination. It is the difference with SCO claims.

I support IBM on this one

Posted Feb 26, 2004 20:16 UTC (Thu) by lakeland (subscriber, #1157) [Link]

I'm more inclined to stick to moral/sanity arguments rather than legal
ones (perhaps because IANAL?). From a moral perspective, IBM has asked
nicely, they've played fair elsewhere, and what they're asking for doesn't
inconvenience anybody else. So, what is lost by agreeing? Notice that the
"they've played fair elsewhere" clause invalidates the argument that
thousands of hardware companies could now ask for silly glue.

Also, I agree 100% with their argument that it isn't a derived work (in
the rational sense, I've given up trying to make judgements about derived
works in the legal sense since it is just too counterintuitive). The
compatibility layer clearly shows it is a work for another platform which
was ported to Linux. To me, and the dictionary seems to agree, derived
means 'comes from', not 'is intimately tied to'. Often those are the
same, but here they're not.

GPL, GPFS, and exporting kernel symbols

Posted Feb 26, 2004 14:20 UTC (Thu) by Duncan (guest, #6647) [Link]

As I posted last week, I think this discussion is missing one item that needs
considered. Last week the article mentioned that the person requesting the
change to EXPORT from GPL_EXPORT was none other than the person
that originally proposed the patch. Therefore, it obviously has his permission
and that isn't in question. Also, his code is GPLed as part of the kernel and
naturally gets access to the rest of the kernel as such. He's free to
dual-license it elsewise to whoever, including proprietary-ware folks as it's his
code. However, what of the code HE calls? How much of a say should
THOSE authors get? What about code THEY call? How far do such things
permission questions need to revert?

At that time, I hadn't taken a look at the request or the patch. I now have.
I'm no kernel hacker by far, but the patch seems reasonably self-coherent.
Other than the header and export definitions, naturally in their respective
files, everything applies as a single linear patch to a single file, so he's not
piece-mealing anything. I'm not qualified to determine how many kernel
functions he calls and how deep in the kernel THEY are, but its obvious this
patch wasn't extremely invasive, more additive, and that it's as self coherent
as it can be. Therefore, the ones that maintain the file the function is added
to and any functions it calls should be easily determinable, as should their
status both within the kernel and in the patch. The opinions of owners and
maintainers of at least the direct callees should be taken into account, IMO.
If none of them object, there shouldn't be a problem. If one or more of them
do, then it becomes more of a judgement call.

As well, the request mentions that the IBM GPFS folks were instrumental in
testing the patch. I also noted that the original patch proposal included a
straight EXPORT, not the GPL_EXPORT that is the current situation. I
don't know the history of that, whether general kernel policy changed since
then, whether it was introduced with GPL_EXPORT by policy or
deliberately changed on introduction, or what, but it does seem obvious that
the original intention was that it be generally exported as evidenced by the
unrestricted EXPORT in the original patch proposal.

As the article points out, the request is a generally valid request in that it's a
legitimate function that filesystems of the general genre could certainly use.
Thus, the policy debate shouldn't be restricted to this particular case, either.
As Morton seemed to be getting at, the question then becomes one of is this a
function that we want to export to make available to non-GPL callers or not?
If the answer is yes, then certainly IBM being the friendly force they are
shouldn't change that. If they answer is no, then just because IBM is friendly,
shouldn't change it either.

Then we have the question of GPFS itself. The article is forthcoming enough
with the information that it's IBMs, and that it originated in AIX and remains
currently proprietary, and with the BSD license info on the "glue" module.
However, there's still a vital piece of info missing. Presumably IBM is only
asking for this having considered and rejected the possibility of making the
entire fs open source, as they have with a lot of other code. Unfortunately,
no mention of why this may be is made. Is this something that indeed DOES
have NON-IBM intellectual property belonging to others in it and therefore
CANNOT be open sourced without their go-ahead? (Of course, SCO is
claiming this to be the case with all sorts of previous IBM donated code,
which it appears to think it can restrict in entirety even without owning a bit
of it, simply because it touched AIX, a UNIX licensee. I'm asking about a
more reasonable claim of third party IP.) If that isn't claimed to be the case,
then it's simply IBM saying it doesn't want to release this particular code just
yet, for whatever reason, probably competitive. That's certainly within its
rights as it owns the code in question, but it's certainly within the rights of the
Linux folks to fail to be cooperative with their code as well, then, in this
instance, despite past cooperation. What is the current distribution and usage
of the filesystem and how would that conceivably expand if it were GPLed?
IOW, what are the practical implications for IBM choosing not to open
source the FS at this point, and is it likely to do so in the future? How might
the decision of the kernel folks now impact such a future decision?

Yes, I just got thru a couple paragraphs up saying GPFS in specific shouldn't
make a big difference to the case, since it's already acked that the function in
question is a legitimate call for such file systems, which means it's ultimately
a larger policy question. However, until another such proprietary file system
asks, it's just the one, and the question could always be put off until later,
keeping it GPL_EXPORT for the present. Thus, the questions above about
this /particular/ case certainly matter to the degree that timing is an issue,
even if they don't matter to the eventual policy debate. Unfortunately, tho
the issue has been covered two weeks in a row by LWN, both articles
overlooked this seemingly quite apropos question.

Personally, as I mentioned last week, I'm all for letting them hang. The
authors of proprietary-ware by the very fact that it IS proprietary are
demonstrating an unwillingness to operate in what most open source
developers have chosen to believe in to the point of making a commitment to
at VERY MINIMUM invest a significant amount of personal time in. That
goes double for kernel developers, who've obviously invested a VERY
significant amount of time to open source. For a propriatery-ware developer
to ask such a favor while refusing to open his own work is in some ways akin
to a slap in the face! I firmly believe that every bit of code turned open
source makes this world a better place, and thus, believe that every effort to
encourage that should be made, and the converse also, that little if any time
should be given to abiding the requests of those continuing to support
proprietary-ware. None-the-less, I'm pragmatic enough to realize that
proprietary-ware will not only exist for some time, and that we must co-exist
with it, but that sometimes yielding a bit may produce the greater gain,
ultimately, for libre-ware, and thus, for what I believe to be a better world,
Unfortunately, there are still a few pieces missing from the coverage here for
me to hold a fully informed opinion as to the merits of this particular case
and how the current decision may advance or inhibit the software libre cause.

Duncan

GPL, GPFS, and exporting kernel symbols

Posted Feb 26, 2004 17:07 UTC (Thu) by simlo (subscriber, #10866) [Link]

Is there anything in the GPL hindering me in distributing a Linux kernel
with any GPL_EXPORT changed to EXPORT?

I don't think so - that would in fact be contrary to the GPL!

So what hinders me in making those patches, destribute the revised Linux kernel (under the GPL naturally) and then I destribute the modules I want to load? Nothing!

Legally there can be no difference between the original Linux kernel and the revised one - both are GPL with a lot of different copyright holders.

Ofcourse the change GPL_EXPORT to EXPORT might convince a doubting judge that you stepped our some barrier, but I fail to see it has any legal significance.

Thus the whole question of allowing some modules to be binary and others not, and only some symbols to be available from binary modules and some not is bogus. It MUST be either or. See my comments above.

GPL, GPFS, and exporting kernel symbols

Posted Feb 27, 2004 17:10 UTC (Fri) by giraffedata (subscriber, #1954) [Link]

It's even easier than that.

IBM could simply create a second glue layer, one which does nothing but re-export invalid_mmap_range in a way that the module loader would be willing to link to the GPFS module. License that layer as GPL.

Or provide an enhanced Insmod program that can take a module that in no way offers a GPL license and converts the symbol references properly so they link up to _GPLONLY symbols.

I think the only legal effect EXPORT_SYMBOL_GPL has is that it makes it really hard to use a subroutine without the author's permission by mistake (or claim that you did it by mistake). But whether the author's permission has any legal bearing is an open question.

GPL, GPFS, and exporting kernel symbols

Posted Feb 27, 2004 20:34 UTC (Fri) by gleef (guest, #1004) [Link]

To my knowledge there's no legal barrier to patching the Linux kernel so that a GPL_EXPORT becomes an EXPORT, nor is there a legal barrier to distributing the patch or the patched kernel. The potential legal issue is with the modules that use these exported items.

In my view, the main purpose of the GPL_EXPORT is to make it blindingly obvious to module developers that if your proprietary module requires this item, your module will be subject to extra scrutiny that might lead to a lawsuit from a kernel developer who thinks your proprietary use of GPL code is a violation of his or her copyrights.

To phrase it another way, EXPORT puts the code into the official exported kernel ABI, and using the exported kernel ABI to develop your proprietary module is pretty clearly making a separate work that is not derivative of the Linux kernel. On the other hand, GPL_EXPORT is for stuff that's really internal bits, but the developers have some reason to make it look like ABI to well-behaved GPLed modules.

Distributing a proprietary module based on Linux kernel internals is dancing in a gray area of potentially distributing derivative works without a license. It might just get an angry developer to sue you. One of the first parts of such a lawsuit would be an injunction against distributing that module. Since almost all proprietary, binary-only Linux kernel modules are distributed by commercial entities for business reasons, it would presumably hurt to no longer be able to ship the module.

In this particular case, IBM is trying to sell Linux clusters using this filesystem, and it would benefit both IBM and the Linux developers to identify and resolve any legal issues with GPFS as early as possible. Exporting a symbol that apparently should be part of the official exported ABI would be a big step towards resolving this.

GPL, GPFS, and exporting kernel symbols

Posted Mar 3, 2004 14:42 UTC (Wed) by Duncan (guest, #6647) [Link]

> Is there anything in the GPL hindering me in distributing a
> Linux kernel with any GPL_EXPORT changed to EXPORT?

Actually, I believe so. You are violating the granted license of the original
authors. You are free to make your own modifications and license them
under the GPL and any other license you choose, but that doesn't give you
the right to change the license of code that is not yours, which modifying the
export provisions of said code would in effect be doing.

IOW, the modification itself can be legally distributed, but you still violate
copyright law by making the calls if you do so yourself, or by being an
accessory to the violation if you do NOT do so yourself.

OTOH, it WOULD be legally possible to provide the mods as a patch or in
other discriptive format, such that the on-site user could make the changes as
desired and under your instructions. Because the GPL doesn't restrict use, or
modification by the end user (because the modified source only has to be
distributed to users, which would mean the end user doing the mod, so it's
already done <g> the reason companies can modify code for their internal
use without distributing their mods), it's perfectly legal for someone to TELL
you how to make the mods, which is effectively what a patch does, and for
you to then USE the mods once made, including with their proprietary
source. However, the mods would have to be distributed in instruction/patch
form, and be applied by the user.

Thus, since the target market for this proprietary file system is presumably
large business customers with which IBM would most likely be working to do
the installation in the first place, it's easy enough for them to get around the
GPL_EXPORT issue, in individual installations. I believe they could even
make the patch part of the installation script, as long as the distributed
sources were kept pure/unmodified, and then modified at installation by the
script or whatever. It's really not a huge problem in practice, then, except
that it would of course be easier not to have to worry about making the mod
during installation, saving that step. However, IBM is playing nice and asking
for the mod, and it DOES prevent them from having to take that extra step at
installation.

Of course, IANAL and all that..

Duncan

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