OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Mar 28, 2024 11:48 am

All times are UTC - 6 hours




Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 19 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: multiboot.h license
PostPosted: Tue Jun 10, 2014 9:21 pm 
Offline
Member
Member
User avatar

Joined: Sun Aug 25, 2013 5:47 pm
Posts: 86
Location: Nebraska, USA
The Detecting Memory (x86) article, when it talks about using GRUB to do memory detection for you, has this in it:

Quote:
To utilize the information that GRUB passes to you, first include the file multiboot.h in your kernel's main file. Then, make sure that when you load your _main function from your assembly loader, you push EBX onto the stack. The Bare bones tutorials have already done this for you.


However, it fails to note that the header is licensed under the GPL v2 or later, which forbids using it in non-GPL programs. I myself didn't look at it too closely until yesterday or so, when I realized that since my OS is under the CC0, I was in copyright infringement! When I got access to my desktop today, I purged the header out of my GitHub repository (and its history too).

Now, I understand I should have looked more closely at the header, but shouldn't there be a heads-up in the wiki entry that it is under the GPL v2 (or later), just to be nice and safe?

_________________
"Procrastination is the art of keeping up with yesterday."


Top
 Profile  
 
 Post subject: Re: Detecting memory (x86) article
PostPosted: Tue Jun 10, 2014 9:52 pm 
Offline
Member
Member
User avatar

Joined: Wed Dec 01, 2010 3:41 am
Posts: 1761
Location: Hong Kong
ScropTheOSAdventurer wrote:
However, it fails to note that the header is licensed under the GPL v2 or later


It clearly stated in the header file.

ScropTheOSAdventurer wrote:
but shouldn't there be a heads-up in the wiki entry that it is under the GPL v2 (or later), just to be nice and safe?

I don't think it is necessary to re-emphasis license of any 3rd party reference. It's the user's duty to check them.
Also note that it may not be so nice unless you have people to periodically check the correctness of the license terms, e.g. if you say XXX is under GPLv2, but what if one day it changed to CC0 without your notice?


Top
 Profile  
 
 Post subject: Re: Detecting memory (x86) article
PostPosted: Wed Jun 11, 2014 12:10 am 
Offline
Member
Member
User avatar

Joined: Sat Mar 31, 2012 3:07 am
Posts: 4591
Location: Chichester, UK
Are you modifying the header? If not, I don't see your problem.


Top
 Profile  
 
 Post subject: Re: multiboot.h license
PostPosted: Wed Jun 11, 2014 7:17 am 
Offline
Member
Member
User avatar

Joined: Sun Aug 25, 2013 5:47 pm
Posts: 86
Location: Nebraska, USA
Fair enough.

_________________
"Procrastination is the art of keeping up with yesterday."


Top
 Profile  
 
 Post subject: Re: multiboot.h license
PostPosted: Wed Jun 11, 2014 8:56 am 
Offline
Member
Member
User avatar

Joined: Wed Jan 06, 2010 7:07 pm
Posts: 792
It's still a problem whether you modify it or not. Considering the nature of the header, I doubt you'll run into any real issues, but if you want you can just redo the struct definitions yourself instead of using multiboot.h directly.

_________________
[www.abubalay.com]


Top
 Profile  
 
 Post subject: Re: multiboot.h license
PostPosted: Wed Jun 11, 2014 9:33 am 
Offline
Member
Member
User avatar

Joined: Sat Mar 31, 2012 3:07 am
Posts: 4591
Location: Chichester, UK
Why is it a problem? You are reproducing it unchanged and are not creating a "derivative work" from it. It's not like using a GPL library; it's just a few defines, struct definitions, and/or macros. Stallman has stated that there is no problem in using a GPL header file in this way in non-GPL or even commercial works.

In any case, this is just a copyright issue. The usage made of the header file would most certainly fall under the "fair usage" dictate.


Top
 Profile  
 
 Post subject: Re: multiboot.h license
PostPosted: Wed Jun 11, 2014 2:50 pm 
Offline
Member
Member
User avatar

Joined: Wed Mar 21, 2012 3:01 pm
Posts: 930
Did you check if the file inlined in the documentation was the real deal? It's not. That's an old version from 2001, while the grub-2.00 release has an include/multiboot.h file which is copyrighted up through 2010. It also has a different license:

Code:
/*  multiboot.h - Multiboot header file.  */
/*  Copyright (C) 1999,2003,2007,2008,2009,2010  Free Software Foundation, Inc.
*
*  Permission is hereby granted, free of charge, to any person obtaining a copy
*  of this software and associated documentation files (the "Software"), to
*  deal in the Software without restriction, including without limitation the
*  rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
*  sell copies of the Software, and to permit persons to whom the Software is
*  furnished to do so, subject to the following conditions:
*
*  The above copyright notice and this permission notice shall be included in
*  all copies or substantial portions of the Software.
*
*  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
*  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
*  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL ANY
*  DEVELOPER OR DISTRIBUTOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
*  WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
*  IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/


That's the MIT license.


Top
 Profile  
 
 Post subject: Re: multiboot.h license
PostPosted: Sat Jun 14, 2014 12:07 am 
Offline
Member
Member
User avatar

Joined: Sun Aug 25, 2013 5:47 pm
Posts: 86
Location: Nebraska, USA
I need to respond to some stuff!

@sortie: Thanks for the tip! I would use it, but I already made my own header :l. Also, I should have noticed it was out of date, since the multiboot header missed a lot of stuff that the specification talked about.


@Rusky, yeah, best to play it safe.

@iansjack: Now, here I got some ground to cover!


When I said fair enough, I didn't mean that towards what YOU said (no offense meant to be taken). To be blunt, I need to slay your dangerous assumption that as long as you don't touch a header and just include it, you technically haven't made a derivative. :!: :!: :!: :!:

Now, lets look at how GPL v2 defines "a work based on a Program", aka a derivative (in both quotes I bolded the important stuff):

Quote:
This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you".


So my OS is technically a derivative (perverted I would say, but it says so).

Now, the nail in the coffin!

Quote:
These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it.


If I distributed the header separately, then I would be okay. But since I lumped them together, that is a problem!!!!

So no matter what Mr. Stallman says, the license says differently. And HE doesn't own the code, the FSF does. So he has no REAL say on this matter.


And about fair use, I probably would, unless I got into some kangaroo court. Cornell, says these four factors are put into consideration in terms of whether I am in the land of fair use:

Quote:
(1) the purpose and character of the use, including whether such use is of a commercial nature or is for nonprofit educational purposes;

(2) the nature of the copyrighted work;

(3) the amount and substantiality of the portion used in relation to the copyrighted work as a whole; and

(4) the effect of the use upon the potential market for or value of the copyrighted work.


About #1: My code is under the CC0.
#2: It is just a simple header.
#3: It is, again, just a simple header. It can also be easily re-implemented.
#4: It is under the GPL, after all.



However, it is best to play safe. Fair use IS an affirmative defense after all; in other words, I can only use it AFTER I get sued, not as a way to PREVENT me from GETTING sued.

_________________
"Procrastination is the art of keeping up with yesterday."


Top
 Profile  
 
 Post subject: Re: multiboot.h license
PostPosted: Sat Jun 14, 2014 3:01 am 
Offline
Member
Member
User avatar

Joined: Sat Mar 31, 2012 3:07 am
Posts: 4591
Location: Chichester, UK
Having spent much of my working life dealing with Copyright issues, and having discussed these matters on numerous occasions with legal experts who know a lot more about the subject than I do, I have to respectfully disagree with your interpretation of the licence. I am no more prepared to bow to unfair licence terms from the FSF than I would be from Microsoft or Apple. I would quite happily use the header as is without fear of litigation.

As it happens, all this is made irrelevant by the fact that newer versions of the header explicitly allow for this sort of usage. The FSF have clarified the common-sense interpretation of the licence that I am sure was always intended.

Edit: As Richard Stallman is the founder, and President, of the FSF and author of the GPL I think it might be a courtesy to give a little weight to his views on the subject.


Top
 Profile  
 
 Post subject: Re: multiboot.h license
PostPosted: Tue Jun 17, 2014 12:13 am 
Offline
Member
Member

Joined: Wed Mar 09, 2011 3:55 am
Posts: 509
Scrop:

Your interpretation of the GPL would cause any non-GPL compatible userspace program written for Linux to be infringing.


Top
 Profile  
 
 Post subject: Re: multiboot.h license
PostPosted: Tue Jun 17, 2014 6:41 am 
Offline
Member
Member
User avatar

Joined: Sat Mar 31, 2012 3:07 am
Posts: 4591
Location: Chichester, UK
linguofreak wrote:
Scrop:

Your interpretation of the GPL would cause any non-GPL compatible userspace program written for Linux to be infringing.

Or that if you use gcc to compile a program then it makes a program infringing. After all, you are creating a "derivative work" of gcc.


Top
 Profile  
 
 Post subject: Re: multiboot.h license
PostPosted: Tue Jun 17, 2014 7:58 am 
Offline
Member
Member
User avatar

Joined: Wed Oct 18, 2006 3:45 am
Posts: 9301
Location: On the balcony, where I can actually keep 1½m distance
Legalese stinks.

Let's start with the derivative work nonsense: if you compile a program, GCC does not put copies of itself in there. (and libgcc isn't exactly GPL). You are however including multiboot.h verbatim. And people will possibly make (uneducated) GPL challenges on those grounds if you keep that license with non-gpl code.

The real copyright exclusion comes from beyond the GPL: To implement the multiboot standard, you will need to send and receive fixed structures. Because these structures are fixed by specification, and needed for interoperability you essentially can't claim copyright on their structure - and this is probably what Stallman's opinion is based upon. You can still however copyright all the other parts of the file, so copying only the definitions you need to your own file is sufficient to keep all but the most annoying legal trolls at bay. Or just use the MIT-licensed version since that's probably even faster :wink:

_________________
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]


Top
 Profile  
 
 Post subject: Re: multiboot.h license
PostPosted: Tue Jun 17, 2014 8:05 am 
Offline
Member
Member

Joined: Thu Jul 05, 2012 5:12 am
Posts: 923
Location: Finland
Just a side note. I made two example cases:

Code:
Case 1:
   #include <somelibrary/someheader.h>
   ...
   ...

Case 2:
   #include "someheader.h"
   ...
   ...


Case 1, there is a header inclusion but that header does not belong to the source code base of this program. Case 2, there is also a header inclusion and that header belongs to the source code base.

The final binary does not care. However, I think that there might be a slight difference when it comes to licenses. Just a feeling, no facts.

_________________
Undefined behavior since 2012


Top
 Profile  
 
 Post subject: Re: multiboot.h license
PostPosted: Tue Jun 17, 2014 8:47 am 
Offline
Member
Member
User avatar

Joined: Wed Jan 06, 2010 7:07 pm
Posts: 792
That is one thing we can be absolutely sure makes no difference whatsoever.

_________________
[www.abubalay.com]


Top
 Profile  
 
 Post subject: Re: multiboot.h license
PostPosted: Tue Jun 17, 2014 10:17 am 
Offline
Member
Member
User avatar

Joined: Sat Mar 31, 2012 3:07 am
Posts: 4591
Location: Chichester, UK
Quote:
Let's start with the derivative work nonsense: if you compile a program, GCC does not put copies of itself in there. (and libgcc isn't exactly GPL). You are however including multiboot.h verbatim.

I disagree. You are including the statement "#include <multiboot.h>" verbatim. That is all; it is no more than inclusive the line "$CC = /usr/bin/gcc" in a make file. Whether that include statement means anything depends upon whether the file "multiboot.h" exists on the system of the person compiling the program. It may or may not; and if it does it may be a completely different file from the copyright one. You can certainly argue (if angels on the heads of pins particularly interests you) about the source that supplied that header file but not about the source that simply references it. No more do you have to GPL every program that use multiboot.h than you do every shell script that contains the line "!/bin/sh".

Stallman's "opinion" is more than just an opinion. It is a statement from the person who wrote the GPL and is president of the organization that holds copyright on the file in question. That is not a mere opinion, it is carte blanche. There is not a court in any country that would rule against someone using the file in those circumstances.

And the clincher - the latest version of the file is not GPL, so this whole discussion is of even less relevance than those angels.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 19 posts ]  Go to page 1, 2  Next

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 20 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group