linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Unclear BSD licensing (headers, MODULE_LICENSE, versions)
@ 2016-05-14 22:44 Rafał Miłecki
  2016-05-15  2:43 ` Theodore Ts'o
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Rafał Miłecki @ 2016-05-14 22:44 UTC (permalink / raw)
  To: Linux Kernel Mailing List
  Cc: linux-arm-kernel, devicetree, Florian Fainelli, Dan Haab, Hauke Mehrtens

Hi,

I recently received a hint that it would be nice/expected to have DTS
files licensed under BSD. I had no experience with BSD, so I started
looking at this and the way kernel parts use it.

Obviously Linux kernel is licensed under GPLv2, so all its code has to
use GPLv2 compatible license. I found 3 BSD licenses in use by kernel
code:
1) BSD 3-clause license
2) BSD 2-clause license
3) Clear BSD license

Unfortunately in many cases (of source files) I wasn't able to clearly
determine used BSD license.

First of all, an accepted ident "Dual BSD/GPL" doesn't specify BSD
version. All I can read in include/linux/module.h is "[GNU Public
License v2 or BSD license choice]". It could mean any (of GPLv2
compatible) BSD versions.


I guess ideally (in current situation) every file using "Dual BSD/GPL"
should specify BSD license version in a header. However this isn't the
case.

1) Some "Dual BSD/GPL" sources mention GPL in a header forgetting about BSD.
Can we treat such files as BSD-licensed at all? Few examples:
arch/arm/mach-pxa/am300epd.c
drivers/fmc/fmc-trivial.c
drivers/net/ppp/ppp_deflate.c
drivers/scsi/a100u2w.c
drivers/xen/xen-scsiback.c

2) Some "Dual BSD/GPL" sources don't specify BSD version in a header.
E.g. all you can find in a header is "All rights reserved. Licensed
under dual BSD/GPL license.". Two examples:
drivers/char/pcmcia/cm4000_cs.c
drivers/char/pcmcia/cm4040_cs.c


Another problem is text of BSD license

1) Some BSD 2-clause licensed sources don't link to its content.

In case of GPLv2 some sources simply mention this license and refer to
COPYING. Few examples:
a) drivers/bcma/main.c
"Licensed under the GNU/GPL. See COPYING for details."
b) drivers/block/umem.c
"This driver is released to the public under the terms of the GNU
GENERAL PUBLIC LICENSE version 2
c) drivers/mfd/tps6507x.c
"For licencing details see kernel-base/COPYING"

I believe the same could be done for BSD 2-clause license, however
there is no file that can be pointed. It results in some sources
specifying 2-clause license in a header without really providing the
content. Example:
arch/arm/boot/dts/lpc4350.dtsi

2) Some BSD 3-clause or Clear BSD licensed sources don't provide needed text

Many templates of BSD 3-clause license I found contain <organization>
that should be replaced by a proper organization/company. That makes
me suspect we can't have a generic text of BSD 3-clause or Clear BSD
in any shared file like COPYING. However there are sources that
specify one of above licenses without providing or linking its text.
Few examples:
arch/blackfin/mach-bf609/include/mach/anomaly.h
drivers/block/zram/zram_drv.c


I'm wondering how we could improve this situation. I got 2 main ideas:

1) Extend MODULE_LICENSE
We could add new acceptable entries specifying BSD version. We could
try to improve checkpatch.pl to look for a full license in a header
(it seems to be required as it has to provide <organization>). Maybe
we could figure out (with some lawyers?) how to treat sources using
"Dual BSD/GPL" mentioning GPL only (without BSD) in their header.

2) Get clear rules on how to write a header
If you find extending MODULE_LICENSE a bad idea, maybe we can simply
help people write proper headers. Explain the problem, provide
examples, maybe add some check in checkpatch.pl.

What do you think about this?

-- 
Rafał

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Unclear BSD licensing (headers, MODULE_LICENSE, versions)
  2016-05-14 22:44 Unclear BSD licensing (headers, MODULE_LICENSE, versions) Rafał Miłecki
@ 2016-05-15  2:43 ` Theodore Ts'o
  2016-05-15  9:58   ` Rafał Miłecki
  2016-05-15 12:29 ` Hauke Mehrtens
  2016-05-15 15:39 ` Andrew Lunn
  2 siblings, 1 reply; 5+ messages in thread
From: Theodore Ts'o @ 2016-05-15  2:43 UTC (permalink / raw)
  To: Rafał Miłecki
  Cc: Linux Kernel Mailing List, linux-arm-kernel, devicetree,
	Florian Fainelli, Dan Haab, Hauke Mehrtens

On Sun, May 15, 2016 at 12:44:35AM +0200, Rafał Miłecki wrote:
> 
> I recently received a hint that it would be nice/expected to have DTS
> files licensed under BSD. I had no experience with BSD, so I started
> looking at this and the way kernel parts use it.

There is a lot of sloppiness in some of the driver code.
Unfortunately, fixing it is something that really has to be done by
the copyright holder, or whoever submitted the kernel in the first
place and who has clear knowledge of what the copyright holder had
intended.

There is also a fairly wide range of seriousness of the various
defects you've listed.  On one extreme, although it's true that some
license, such as the ClearBSD license has <Organization> in its
template, when the original code file you've referenced has in its header:

 * Copyright 2004-2012 Analog Devices Inc.
 * Licensed under the Clear BSD license.

....tt's pretty obvious that Organization should be "Analog Devices Inc".

In other cases, it's pretty clear that someone copied the drivers from
some out-of-tree distribution (e.g., "see kernel-base/COPYING...") and
where finding the original distribution and then adding the Copyright
permission statement is a pretty easy thing to do.  (And in case where
a third party can easily show proof that the intent of the copyright
holder is clearly expressed, that third party probably is able to
submit a patch to fix up the source file.

> I'm wondering how we could improve this situation. I got 2 main ideas:
> 
> 1) Extend MODULE_LICENSE
> We could add new acceptable entries specifying BSD version. We could
> try to improve checkpatch.pl to look for a full license in a header
> (it seems to be required as it has to provide <organization>). Maybe
> we could figure out (with some lawyers?) how to treat sources using
> "Dual BSD/GPL" mentioning GPL only (without BSD) in their header.

I'm not a fan of this approach.  MODULE_LICENSE puts a hint about the
copyright license of a module where it can be found by the module
loader.  This is useful to enforce things like GPL_SYMBOL_EXPORT, but
I don't think we should try to make MODULE_LICESE to be more than
that.

> 2) Get clear rules on how to write a header
> If you find extending MODULE_LICENSE a bad idea, maybe we can simply
> help people write proper headers. Explain the problem, provide
> examples, maybe add some check in checkpatch.pl.

Adding more text about how to add a proper copyright notice and
license permission statement to the SubmittingDrivers file seems like
a good idea.

I doubt we can make checkpatch.pl smart enough to handle this
situation cleanly.

Cheers,

						- Ted

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Unclear BSD licensing (headers, MODULE_LICENSE, versions)
  2016-05-15  2:43 ` Theodore Ts'o
@ 2016-05-15  9:58   ` Rafał Miłecki
  0 siblings, 0 replies; 5+ messages in thread
From: Rafał Miłecki @ 2016-05-15  9:58 UTC (permalink / raw)
  To: Theodore Ts'o, Rafał Miłecki,
	Linux Kernel Mailing List, linux-arm-kernel, devicetree,
	Florian Fainelli, Dan Haab, Hauke Mehrtens, linux-doc

[Adding linux-doc@ which I probably should use from the beginning]

On 15 May 2016 at 04:43, Theodore Ts'o <tytso@mit.edu> wrote:
> On Sun, May 15, 2016 at 12:44:35AM +0200, Rafał Miłecki wrote:
>>
>> I recently received a hint that it would be nice/expected to have DTS
>> files licensed under BSD. I had no experience with BSD, so I started
>> looking at this and the way kernel parts use it.
>
> There is a lot of sloppiness in some of the driver code.
> Unfortunately, fixing it is something that really has to be done by
> the copyright holder, or whoever submitted the kernel in the first
> place and who has clear knowledge of what the copyright holder had
> intended.
>
> There is also a fairly wide range of seriousness of the various
> defects you've listed.  On one extreme, although it's true that some
> license, such as the ClearBSD license has <Organization> in its
> template, when the original code file you've referenced has in its header:
>
>  * Copyright 2004-2012 Analog Devices Inc.
>  * Licensed under the Clear BSD license.
>
> ....tt's pretty obvious that Organization should be "Analog Devices Inc".
>
> In other cases, it's pretty clear that someone copied the drivers from
> some out-of-tree distribution (e.g., "see kernel-base/COPYING...") and
> where finding the original distribution and then adding the Copyright
> permission statement is a pretty easy thing to do.  (And in case where
> a third party can easily show proof that the intent of the copyright
> holder is clearly expressed, that third party probably is able to
> submit a patch to fix up the source file.

Thanks for your comments. I think I will try to contact authors of
unclear drivers once we get requirements described a bit better.
Hopefully at least some of them will respond.


>> I'm wondering how we could improve this situation. I got 2 main ideas:
>>
>> 1) Extend MODULE_LICENSE
>> We could add new acceptable entries specifying BSD version. We could
>> try to improve checkpatch.pl to look for a full license in a header
>> (it seems to be required as it has to provide <organization>). Maybe
>> we could figure out (with some lawyers?) how to treat sources using
>> "Dual BSD/GPL" mentioning GPL only (without BSD) in their header.
>
> I'm not a fan of this approach.  MODULE_LICENSE puts a hint about the
> copyright license of a module where it can be found by the module
> loader.  This is useful to enforce things like GPL_SYMBOL_EXPORT, but
> I don't think we should try to make MODULE_LICESE to be more than
> that.

OK, if others agree, I'm fine with leaving MODULE_LICENSE as is.


>> 2) Get clear rules on how to write a header
>> If you find extending MODULE_LICENSE a bad idea, maybe we can simply
>> help people write proper headers. Explain the problem, provide
>> examples, maybe add some check in checkpatch.pl.
>
> Adding more text about how to add a proper copyright notice and
> license permission statement to the SubmittingDrivers file seems like
> a good idea.
>
> I doubt we can make checkpatch.pl smart enough to handle this
> situation cleanly.

Thanks, I'll prepare & send patch updating SubmittingDrivers and maybe
some related files (if needed).

However there are some questions I need to ask first:


1) Can we add COPYING-BSD-2-CLAUSE (or similar)?

We already have GPL drivers with headers like:
a) "Licensed under the GNU/GPL. See COPYING for details."
b) "This driver is released to the public under the terms of the GNU
GENERAL PUBLIC LICENSE version 2"

Adding a similar file (e.g. COPYING-BSD-2-CLAUSE) would allow BSD
drivers to reference it as well, e.g.:
"Licensed under the BSD 2-clause. See COPYING-BSD-2-CLAUSE for details."
or similar.
As described earlier, there are some drivers /mentioning/ usage of BSD
license (in a header or with MODULE_LICENSE) without providing its
text at all.


2) How about sharing BSD 3-clause license?

Does it make sense to add anything like COPYING-BSD-3-CLAUSE? Should
we leave <organization> in license text in such file? Or should we
replace it with "author" as some drivers do? How drivers could
reference such file? Would a simple
"Licensed under the BSD 3-clause. See COPYING-BSD-3-CLAUSE for details."
be enough? Or should it be more specific like "With <organization>
being Foo Company"?

Or maybe we shouldn't add anything like COPYING-BSD-3-CLAUSE at all
and just require all drivers to attach whole text of BSD 3-clause
license in a header?

The same questions apply to Clear BSD license which also has
<organization> in its text.

-- 
Rafał

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Unclear BSD licensing (headers, MODULE_LICENSE, versions)
  2016-05-14 22:44 Unclear BSD licensing (headers, MODULE_LICENSE, versions) Rafał Miłecki
  2016-05-15  2:43 ` Theodore Ts'o
@ 2016-05-15 12:29 ` Hauke Mehrtens
  2016-05-15 15:39 ` Andrew Lunn
  2 siblings, 0 replies; 5+ messages in thread
From: Hauke Mehrtens @ 2016-05-15 12:29 UTC (permalink / raw)
  To: Rafał Miłecki, Linux Kernel Mailing List
  Cc: linux-arm-kernel, linux-doc, Florian Fainelli, Dan Haab



On 05/15/2016 12:44 AM, Rafał Miłecki wrote:
> Hi,

......

> Another problem is text of BSD license
> 
> 1) Some BSD 2-clause licensed sources don't link to its content.
> 
> In case of GPLv2 some sources simply mention this license and refer to
> COPYING. Few examples:
> a) drivers/bcma/main.c
> "Licensed under the GNU/GPL. See COPYING for details."
> b) drivers/block/umem.c
> "This driver is released to the public under the terms of the GNU
> GENERAL PUBLIC LICENSE version 2
> c) drivers/mfd/tps6507x.c
> "For licencing details see kernel-base/COPYING"

When I talked to some lawyers they did not like it when you only
reference a file and do not explicitly specify which license you are
using. The problem is that the code could be moved to an other project
with a different COPYING file. They were fine with b) because that
explicitly says which license text you mean. When you move this to
somewhere else you can still find our which license was meant here.

> I believe the same could be done for BSD 2-clause license, however
> there is no file that can be pointed. It results in some sources
> specifying 2-clause license in a header without really providing the
> content. Example:
> arch/arm/boot/dts/lpc4350.dtsi
> 
> 2) Some BSD 3-clause or Clear BSD licensed sources don't provide needed text
> 
> Many templates of BSD 3-clause license I found contain <organization>
> that should be replaced by a proper organization/company. That makes
> me suspect we can't have a generic text of BSD 3-clause or Clear BSD
> in any shared file like COPYING. However there are sources that
> specify one of above licenses without providing or linking its text.
> Few examples:
> arch/blackfin/mach-bf609/include/mach/anomaly.h
> drivers/block/zram/zram_drv.c

I like the text of the ISC license:
https://en.wikipedia.org/wiki/ISC_license
This license is a BSD license, but it does not have <organization> in it
and is even shorter that the ofter BSD licenses. Qualcomm Atheros used
this license text for ath9k and some other code. The main purpose was to
make it possible to integrate this code into *BSD. You can also put such
a short license text directly into your code.

This also allowed you to use the code in proprietary operating systems
like VxWorks.

> I'm wondering how we could improve this situation. I got 2 main ideas:
> 
> 1) Extend MODULE_LICENSE
> We could add new acceptable entries specifying BSD version. We could
> try to improve checkpatch.pl to look for a full license in a header
> (it seems to be required as it has to provide <organization>). Maybe
> we could figure out (with some lawyers?) how to treat sources using
> "Dual BSD/GPL" mentioning GPL only (without BSD) in their header.
> 
> 2) Get clear rules on how to write a header
> If you find extending MODULE_LICENSE a bad idea, maybe we can simply
> help people write proper headers. Explain the problem, provide
> examples, maybe add some check in checkpatch.pl.

I see MODULE_LICENSE more as a hint not as a legal binding thing. You
could also have a module which uses a file which is licensed under GPL
and one which is licensed under BSD license. Then the compiled module is
GPL, but parts of the cod is still BSD. I prefer to have the license
information in each source file, as a reference to a license (not some
generic file) or directly the license text.

Hauke

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Unclear BSD licensing (headers, MODULE_LICENSE, versions)
  2016-05-14 22:44 Unclear BSD licensing (headers, MODULE_LICENSE, versions) Rafał Miłecki
  2016-05-15  2:43 ` Theodore Ts'o
  2016-05-15 12:29 ` Hauke Mehrtens
@ 2016-05-15 15:39 ` Andrew Lunn
  2 siblings, 0 replies; 5+ messages in thread
From: Andrew Lunn @ 2016-05-15 15:39 UTC (permalink / raw)
  To: Rafa?? Mi??ecki
  Cc: Linux Kernel Mailing List, devicetree, Dan Haab,
	Florian Fainelli, linux-arm-kernel, Hauke Mehrtens

On Sun, May 15, 2016 at 12:44:35AM +0200, Rafa?? Mi??ecki wrote:
> Hi,
> 
> I recently received a hint that it would be nice/expected to have DTS
> files licensed under BSD.

I've not done a count, but i think you will find that most device tree
files use X11 as the second license, not BSD.

      Andrew

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-05-15 15:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-14 22:44 Unclear BSD licensing (headers, MODULE_LICENSE, versions) Rafał Miłecki
2016-05-15  2:43 ` Theodore Ts'o
2016-05-15  9:58   ` Rafał Miłecki
2016-05-15 12:29 ` Hauke Mehrtens
2016-05-15 15:39 ` Andrew Lunn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).