Dealing With Contentious Kernel Blobs

dcp's picture

The issue of binary kernel blobs cropped up on the gNewSense Mailing list recently. The discussion I saw was friendly enough, but the real benefit for me was that I got to see just why kernel blobs are so, well... contentious.

Just imagine, if you will, watching the discussion unfold before your very eyes - or part of it anyway. A BLAG developer suggests some kernel blobs are actually GPL'ed - their source is directly in the kernel - and that the gNewSense team should most likely feel free to keep them in the distribution. But one after another responds to the effect that, despite the license, they will need to verify that each meets the 4 Freedoms defined by the FSF. An unwitting witness might instantly assume these gNewSense guys are serious, frothing, Free Software fanatics beyond your wildest imaginations. However, asking a few questions goes a long way.

I asked Kevin Dean, in particular, about his response, which initially threw my mind into an infinite loop of its own. He started off saying, effectively, that it was possible for a GPL'ed program to not actually respect all of the 4 Freedoms. You can probably see the loop starting already. He then gave this example:

For instance, several of the drivers in the Linux kernel are licensed under the GNU GPL but since the sources themselves do direct memory accesses - preventing the user from understanding the process of WHY these edits do a given thing - we feel that they do NOT respect freedom 1. Furthermore, without understanding what the direct memory edits are doing, you really don't have freedom to change how they function.

Ok, I thought. It's GPL'ed, but it doesn't respect the 4 Freedoms? How the heck is that possible - blob or no blob? That is essentially the question I posed to Dean. What's so special about blobs? After all, you have the sources. In reality, I was a little concerned that these gNewSense guys had gone way off the deep end. Not being a developer, I felt a bit lost. Dean was kind enough to humor me and took my question seriously.

I am including the second half of his response by his permission, and you should note that his response is his own (he is not speaking for the gNewSense project). He started off with a basic crash course in how programs are converted into the binary signals that a processor can actually work with, and pointed out that this is where the issue arises...

While it is possible to look at the C code and say "Oh, this activates power saving mode" it is also, in the C source code, possible to give instructions that ARE NOT traslated into assembly when the code is compiled. You can, in C, say "Find the bit of data at memory address 0x0f and change it to 0xff".

In the first example, the user who can read C has the ability to look at code and even edit the behavior of the device (a video card in this example) because he can see how the code is handled during each step.

In the case where you don't have human readable code, only assembly instructions written in C, it looks like alphabet soup. Someone can look at the code and see that data (in bits) was put here and there but not WHY that data was there or what event triggered the need for the change. Because he can't see what's happening, the ability to edit it drops exponentially. Sure, the user COULD begin changing numbers around and things would happen but the user still has no control over the device.

Let's make this even more complicated...

Sometimes this "assembly in C" is licensed as Free Software. Fitting in with our fictional example, lets look at the ATI Radeon driver. The very beginning of this driver contains "microcode" which is a form of binary blob. This block of memory addresses is a "configuration" file (so the Radeon developers at Xorg tell me, I do trust their word) that is then sent from the software to the card and the card says "Hey, I should start up" - the computer understands what this string of numbers means, but the user, once again, has no way to see exactly what data is being sent to the card and had no reliable way to change what is in that data.

The implications of this can become almost frightening if you change the "configuration file" to "some unknown chunk of data" and change our fictional device from a video card to a wireles network interface.

So, even though a certain blob may be GPL'ed, the way it is implemented does not respect the user's right to study the software. According to Paul O'Malley, "They are for want of a description precompiled and then published with permission to alter them in their compiled format." Even the best developers would have difficulty making sense of what is happening in these cases. But, most importantly, the developer cannot discern why. Without knowing why something happens, you'd be hard pressed to know what changes to make. Other developers not related to the gNewSense project have confirmed the issue.

Sorting through this kind of issue is seriously tricky stuff, since the software is released as Free/Libre (and even under the GPL), but nevertheless fails to respect all four freedoms as defined by the FSF. It is fairly common knowledge that Debian ships with blobs, and only BLAG, gNewSense and OpenBSD have considered them a threat. Dean pointed out the fact that some fairly serious flame wars have cropped up in various lists over this very point. No Doubt. The ultimate question I found myself asking is, How Free is Free enough? Dean encourages people to keep an open mind. Issues like this can generate hurt feelings and ill will all around, so best to keep an open mind.

In further conversation, Dean went on to express his personal view that, "I don't believe any license could forbid the use of binary blobs and still be a libre license. Some devices simply will NOT function without them. I'd MUCH rather have someone run the Radeon driver (which has libre microcode) than use the fglrx (?) driver to "unlock" 3D features. I'd also much rather AMD design their cards in a manner that doesn't require a blob in the first place." I agree that avoiding the need for blobs is the best policy. I fear, though, that most manufacturers don't really care about this issue as much as many in our community do.

To keep things in perspective, it appears that most of the blobs involved in this case are for rarely-used hardware, and unlikely to affect most users. How the gNewSense team will ultimately handle the issue remains to be seen. BLAG has apparently allowed them to remain, since they are GPL'ed. Presumably, so will Fedora, which is cleaning up its repositories. As far as I know, only OpenBSD strictly forbids binary blobs. I believe the FSF prefers that the blobs go away, but doubt they are pushing the issue of GPL'ed blobs. I have not seen any condemnation from the FSF regarding GPL'ed blobs, and the GPLv3 does not address them at all.

I think it is a great idea for all distribution developers to consider the impact of blobs on users' freedom. In fact, I think every user needs to give a little serious attention to the issue of freedom in software, and define for themselves where they draw the line when it comes to how free Free needs to be. Personally, I would probably go ahead and allow the GPL blobs to stay in - at least for now. Even so, it certainly seems worth investigating how to avoid blobs and encouraging hardware manufacturers to establish a policy of avoiding them. I can honestly see why binary blobs are problematic and believe they really should be avoided.

The way I understand things, I can actually control what my kernel loads. If I don't want it to load a binary blob, I can make the appropriate changes and re-compile. I may lose some functionality, but I certainly don't need my kernel loading stuff that I don't use. In the non-Free world, I wouldn't even have the ability to choose what to load in my kernel. And this, I think is the real issue. What choice does the user have? And does the user know they have a choice? After all, is not choice the birthright of freedom?


Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

gNewSense's objections are misplaced

I think that in this instance, gNewSense's objections are misplaced. Infringement of the user's "freedom to tinker" lies not so much with the code's particular format, as with a manufacturer's refusal to release register level programming documentation into the public sphere, typically by making it subject to a Non-Disclosure Agreement.

Historically, Linux kernel developers have shown no compunction in signing NDAs, despite the fact that they often make it very difficult for third parties to tackle API-related bugs. This is a particular bone of contention amongst the non-Linux FLOSS projects corporations consider too small or specialized to be worth extending Non-Disclosure Agreements, such as OpenBSD.


Requirements of the GNU GPL

You are not required to distribute copies of the program (modified or not). Freedom 3 and 4 are really freedoms. This is why RMS usually expresses them with the "when you wish" formulation.

Hence you are allowed to modify a software licensed under the GNU GPL and be the only one to profit from these modifications. The requirement is in the way you distribute the software if you choose to do so. You are required to stick with the GNU GPL license. In particular, the (possibly modified) source code must remain available.


Drawing the line

I think every user needs to give a little serious attention to the issue of freedom in software, and define for themselves where they draw the line when it comes to how free Free needs to be.

I agree, and would go on to say that most end users are only really concerned with FSF freedoms 0 and 2 (freedom to use and distribute the software). Most end users aren't developers and/or don't code (or don't plan on making changes to most of the software they use), so they really don't care about/won't apply freedoms 1 or 3. It just turns out that a lot of the linux/open source community in general is interested in being able to modify existing programs to make them better.

It would also be nice to see how different licenses measure up to the FSF freedoms; for example:
Commercial license A:

  • freedom 0: you are not completely free to use it, even after paying the licensing fee.
  • freedom 1: you are not granted access to the source to make modifications.
  • freedom 2: you are allowed to copy it, but may only maintain x number of installed copies at any given time.
  • freedom 3: you are not granted access to the source. You may make extensions or plugins using our API, but otherwise modifications to the program are not permitted.

GPL (note, I'm paraphrasing from what I understand):

  • freedom 0: you are completely free to use it however you want
  • freedom 1: you may make your own changes to the source code of the software, and are encouraged to share the changes as long as they are also GPL
  • freedom 2: you may copy and use it as much as you want (as long as you include the GPL)
  • freedom 3: You are encouraged to make and share improvements (as long as they are also GPL)

Free to use license:

  • freedom 0: you are completely free to use it however you want
  • freedom 1: the source belongs to the developer(s) who may or may not reveal it (upon request)
  • freedom 2: you may copy and use it as much as you want
  • freedom 3: (see freedom 1)

To simplify things further, a scale could be used to rate the degrees of freedom for a given license.
Having a simplified explanation like this would also help educate users on what their options and freedoms are, particularly with regard to border-line licenses (codecs, dvd players, video drivers, etc.) so they can better decide what to do about them.


One more free license

BSD-style license (also paraphrasing):

  • freedom 0: you are completely free to use it however you want
  • freedom 1: you may study the source code and make your own changes
  • freedom 2: you are allowed to distribute exact copies, or even sell products based on the software, as long as you acknowledge the Berkeley University in advertising materials
  • freedom 3: you may redistribute your changes in source or binary form, but you have to retain the BSD copyright notices in files (source redistribution) or documentation (binary redistribution)

In the case of 'freedom 3' BSD license never states that when you build upon the work of others and then distribute you must also share your changes. If you choose binary form you don't have to contribute back, as is for the GPL. This is the main selling point for BSD license to be perceived as more business-friendly. The rationale is that this way at least no wrongly coded new solutions to the solved problems are created, thus the interoperability may be increased.

.

Also quoting Richard Stallman (http://www.sigmasoft.com/~openbsd/archives/html/openbsd-misc/2007-12/msg...)

The GNU Project campaigns to give software users these four essential
freedoms:

Freedom 0: the freedom to run the program as you wish.
Freedom 1: the freedom to study the source code and change it
so it does what you wish.
Freedom 2: the freedom to distribute exact copies to others
when you wish.
Freedom 3: the freedom to distribute copies of your modified versions
to others when you wish.

However, some *BSD user thinks that BSD license is more free than GPL, as the "freedoms" 2 and 3 seem to be requirements rather. So here is the "fixed" version (emphasis added):

The GNU Project campaigns to give software users these two essential
freedoms and two essential requirements:

Freedom 0: the freedom to run the program as you wish.
Freedom 1: the freedom to study the source code and change it
so it does what you wish.
Requirement 2: the requirement to distribute exact copies to others
Requirement 3: the requirement to distribute copies of your modified versions
to others.

Disclaimer:
Note that the above quotes are taken out of context from the public discussion mailing list, and the rest are my personal opinions.


I agree wholeheartedly with

I agree wholeheartedly with Magic Banana's point. One is not required to redistribute anything at all. You are free to acquire the program, modify it to your heart's content, and use it in its modified state. The only requirement is that, when you do choose to redistribute the modified program, you must include the source code (original + your modifications).

I think many people actually misunderstand this point. However, it is a simple thing to read the GNU philosophy pages and the GPL FAQs. All of these plainly state that redistribution is not a requirement.

So I can take GNU/Linux, modify it, use it to make a ga-jillion dollars (kind of like Google), and never redistribute squat - without violating either the letter or the spirit of the GNU GPL (any version).

Another common misconception is that code must be given away freely. I have personally seen people get bent out of shape because someone wants to charge a fee for a GPL'ed program. Yet, the GPL does not require that, and there is even an essay about 'selling' Free Software at the GNU website. But you cannot enforce royalties.

D.C. Parris
Publisher, Blue Gnu
http://www.linkedin.com/in/dcparris
https://www.xing.com/profile/Don_Parris


Requirements of the GNU GPL

Oops.. I posted my comment at the wrong place.