kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
* GPL-only symbol Error
@ 2011-11-22 21:48 Sengottuvelan S
  2011-11-22 21:53 ` Jeff Haran
  0 siblings, 1 reply; 20+ messages in thread
From: Sengottuvelan S @ 2011-11-22 21:48 UTC (permalink / raw)
  To: kernelnewbies

Hi All,

Basically, I am developing a kernel module named "xyz.ko"  and my
MODULE_LICENSE is "Proprietary". I have got an error "GPL-incompatible
module xyz.ko uses GPL-only symbols".

I am having trouble identifying it. How to avoid this error in during
MODPOST?. Is there any way to avoid this error?

Can you someone throw light on this.

Regards,
S. Sengottuvelan.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20111122/52e54c95/attachment.html 

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

* GPL-only symbol Error
  2011-11-22 21:48 GPL-only symbol Error Sengottuvelan S
@ 2011-11-22 21:53 ` Jeff Haran
  2011-11-22 22:08   ` Sengottuvelan S
  0 siblings, 1 reply; 20+ messages in thread
From: Jeff Haran @ 2011-11-22 21:53 UTC (permalink / raw)
  To: kernelnewbies

 

 

From: kernelnewbies-bounces@kernelnewbies.org
[mailto:kernelnewbies-bounces at kernelnewbies.org] On Behalf Of
Sengottuvelan S
Sent: Tuesday, November 22, 2011 1:49 PM
To: Kernel Newbies
Subject: GPL-only symbol Error

 

Hi All,

 

Basically, I am developing a kernel module named "xyz.ko"  and my
MODULE_LICENSE is "Proprietary". I have got an error "GPL-incompatible
module xyz.ko uses GPL-only symbols".

 

I am having trouble identifying it. How to avoid this error in during
MODPOST?. Is there any way to avoid this error? 

 

Can you someone throw light on this.


Regards,
S. Sengottuvelan.

 

Legally, I believe your only option is to change your code to not
reference the EXPORT_SYMBOL_GPL () symbols that it is currently
referencing.

 

Jeff Haran

 


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20111122/fd471df8/attachment-0001.html 

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

* GPL-only symbol Error
  2011-11-22 21:53 ` Jeff Haran
@ 2011-11-22 22:08   ` Sengottuvelan S
  2011-11-22 22:34     ` Greg KH
  2011-11-22 22:35     ` Jeff Haran
  0 siblings, 2 replies; 20+ messages in thread
From: Sengottuvelan S @ 2011-11-22 22:08 UTC (permalink / raw)
  To: kernelnewbies

Hi Jeff,

I have few symbols with this error especially - sock_recv_timestamp(). Is
there way to refer this or similar API in my module with MODULE_LICENSE is
"Proprietary. How do I know equavalent non-EXPORT_SYMBOL_GPL  APIs to
achieve similar functionality.
Regards
Sengottuvelan.S
On Tue, Nov 22, 2011 at 1:53 PM, Jeff Haran <jharan@bytemobile.com> wrote:

> ** **
>
> ** **
>
> *From:* kernelnewbies-bounces at kernelnewbies.org [mailto:
> kernelnewbies-bounces at kernelnewbies.org] *On Behalf Of *Sengottuvelan S
> *Sent:* Tuesday, November 22, 2011 1:49 PM
> *To:* Kernel Newbies
> *Subject:* GPL-only symbol Error****
>
> ** **
>
> Hi All,****
>
>  ****
>
> Basically, I am developing a kernel module named "xyz.ko"  and my
> MODULE_LICENSE is "Proprietary". I have got an error "GPL-incompatible
> module xyz.ko uses GPL-only symbols".****
>
>  ****
>
> I am having trouble identifying it. How to avoid this error in during
> MODPOST?. Is there any way to avoid this error? ****
>
>  ****
>
> Can you someone throw light on this.****
>
>
> Regards,
> S. Sengottuvelan.****
>
> ** **
>
> Legally, I believe your only option is to change your code to not
> reference the EXPORT_SYMBOL_GPL () symbols that it is currently referencing.
> ****
>
> ** **
>
> Jeff Haran****
>
> ** **
>



-- 
Regards,
S. Sengottuvelan.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20111122/5b59c69d/attachment.html 

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

* GPL-only symbol Error
  2011-11-22 22:08   ` Sengottuvelan S
@ 2011-11-22 22:34     ` Greg KH
  2011-11-22 22:35     ` Jeff Haran
  1 sibling, 0 replies; 20+ messages in thread
From: Greg KH @ 2011-11-22 22:34 UTC (permalink / raw)
  To: kernelnewbies

On Tue, Nov 22, 2011 at 02:08:59PM -0800, Sengottuvelan S wrote:
> Hi Jeff,
> ?
> I?have?few symbols with this error especially - sock_recv_timestamp().?Is there
> way to refer this or similar API in my module with MODULE_LICENSE is
> "Proprietary. How do?I know equavalent non-EXPORT_SYMBOL_GPL? APIs to achieve
> similar functionality.

There are none, you need to fix the license of your kernel module.

You do realize the kernel developer community's stance on non-GPL Linux
kernel modules, right?  Any reason why your company feels they can go
against their wishes?

thanks,

greg k-h

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

* GPL-only symbol Error
  2011-11-22 22:08   ` Sengottuvelan S
  2011-11-22 22:34     ` Greg KH
@ 2011-11-22 22:35     ` Jeff Haran
  2011-11-22 22:44       ` Greg KH
  1 sibling, 1 reply; 20+ messages in thread
From: Jeff Haran @ 2011-11-22 22:35 UTC (permalink / raw)
  To: kernelnewbies

From: Sengottuvelan S [mailto:sengottuvelan.s at gmail.com] 
Sent: Tuesday, November 22, 2011 2:09 PM
To: Jeff Haran
Cc: Kernel Newbies
Subject: Re: GPL-only symbol Error

Hi Jeff,
?
I?have?few symbols with this error especially - sock_recv_timestamp().?Is there way to refer this or similar API in my module with MODULE_LICENSE is "Proprietary. How do?I know equavalent non-EXPORT_SYMBOL_GPL? APIs to achieve similar functionality.
Regards
Sengottuvelan.S
On Tue, Nov 22, 2011 at 1:53 PM, Jeff Haran <jharan@bytemobile.com> wrote:
?From: kernelnewbies-bounces at kernelnewbies.org [mailto:kernelnewbies-bounces at kernelnewbies.org] On Behalf Of Sengottuvelan S
Sent: Tuesday, November 22, 2011 1:49 PM
To: Kernel Newbies
Subject: GPL-only symbol Error
?Hi All,
?Basically, I am developing a kernel module named "xyz.ko"??and my MODULE_LICENSE is "Proprietary". I have?got an?error "GPL-incompatible module xyz.ko uses GPL-only symbols".
I am having trouble identifying it.?How to avoid this error in during MODPOST?. Is there any way to avoid this error? 
Can you someone throw light on this.
Regards,
S. Sengottuvelan.
Legally, I believe your only option is to change your code to not reference the EXPORT_SYMBOL_GPL () symbols that it is currently referencing.
Jeff Haran

sock_recv_timestamp() is an inline function, but it calls __sock_recv_timestamp() which is declared like so:

EXPORT_SYMBOL_GPL(__sock_recv_timestamp);

And that is I suspect what is generating the error.

You can try to find equivalent functionality in other kernel code that is not so declared. Good luck with that. Even if you do find it, don't be surprised if down the line you decide to upgrade the kernel you are using and then you find that what were EXPORT_SYMBOL() symbols have been changed to EXPORT_SYMBOL_GPL() and you'll have to do it all over again, if it turns out to be even possible. That's a bad place to be in since its usually completely unanticipated work. Blows development schedules right out of the water.

I've seen others when faced with this who build their own kernels from sources just modify the problematic EXPORT_SYMBOL_GPL()s to EXPORT_SYMBOL()s. I don't know if that is legal. I wouldn't do it personally. Consult a lawyer before you go down that road.

This stuff is designed to encourage you and more specifically the company you work for to declare your module as GPL and make it available for others to use. That's how Linux grows. Convincing management to do so can be quite challenging though. If your company must keep its intellectual property private, they can always dump Linux and use one of the BSD derivatives instead that aren't covered by GPL.

Good luck,

Jeff Haran

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

* GPL-only symbol Error
  2011-11-22 22:35     ` Jeff Haran
@ 2011-11-22 22:44       ` Greg KH
  2011-11-23  0:34         ` Jeff Haran
  0 siblings, 1 reply; 20+ messages in thread
From: Greg KH @ 2011-11-22 22:44 UTC (permalink / raw)
  To: kernelnewbies

On Tue, Nov 22, 2011 at 02:35:24PM -0800, Jeff Haran wrote:
> I've seen others when faced with this who build their own kernels from
> sources just modify the problematic EXPORT_SYMBOL_GPL()s to
> EXPORT_SYMBOL()s. I don't know if that is legal. I wouldn't do it
> personally. Consult a lawyer before you go down that road.

It is not legal and companies have gotten into big trouble by trying to
do that, or by creating "gpl-condom" kernel modules that wrap gpl-only
symbols and export them again.  Do not do that without the full buy-in
from your legal department as they do not want to hear about it from an
external query first.

> This stuff is designed to encourage you and more specifically the
> company you work for to declare your module as GPL and make it
> available for others to use. That's how Linux grows. Convincing
> management to do so can be quite challenging though. If your company
> must keep its intellectual property private, they can always dump
> Linux and use one of the BSD derivatives instead that aren't covered
> by GPL.

Exactly, if you want to use Linux, you must abide by the license of it,
just like any body of software.  What would happen if you decided to
ignore the license of Microsoft's operating system?  :)

thanks,

greg k-h

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

* GPL-only symbol Error
  2011-11-22 22:44       ` Greg KH
@ 2011-11-23  0:34         ` Jeff Haran
  2011-11-23  0:51           ` Greg KH
  2011-11-23  1:09           ` Graeme Russ
  0 siblings, 2 replies; 20+ messages in thread
From: Jeff Haran @ 2011-11-23  0:34 UTC (permalink / raw)
  To: kernelnewbies

> -----Original Message-----
> From: Greg KH [mailto:greg at kroah.com]
> Sent: Tuesday, November 22, 2011 2:44 PM
> To: Jeff Haran; Sengottuvelan S; Kernel Newbies
> Subject: Re: GPL-only symbol Error
> 
> On Tue, Nov 22, 2011 at 02:35:24PM -0800, Jeff Haran wrote:
> > I've seen others when faced with this who build their own kernels
from
> > sources just modify the problematic EXPORT_SYMBOL_GPL()s to
> > EXPORT_SYMBOL()s. I don't know if that is legal. I wouldn't do it
> > personally. Consult a lawyer before you go down that road.
> 
> It is not legal and companies have gotten into big trouble by trying
to
> do that, or by creating "gpl-condom" kernel modules that wrap gpl-only
> symbols and export them again.  Do not do that without the full buy-in
> from your legal department as they do not want to hear about it from
an
> external query first.
> 

Greg,

Just curious, can you provide links to these cases?

I've read the COPYING file at the top of the Linux source tree. I am not
a lawyer, but I don't see anything in it that would prohibit somebody
from taking the GPL kernel sources, changing the EXPORT_SYMBOL_GPL()s to
EXPORT_SYMBOL()s, publishing that modified kernel source as required by
the GPL license but then keep their module source that uses the now
non-GPL symbols private. It seems like it should be prohibited in the
spirit of open source, but I don't see any mention of these symbol
declarations in the license.

Thanks,

Jeff Haran

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

* GPL-only symbol Error
  2011-11-23  0:34         ` Jeff Haran
@ 2011-11-23  0:51           ` Greg KH
  2011-11-23  1:09           ` Graeme Russ
  1 sibling, 0 replies; 20+ messages in thread
From: Greg KH @ 2011-11-23  0:51 UTC (permalink / raw)
  To: kernelnewbies

On Tue, Nov 22, 2011 at 04:34:21PM -0800, Jeff Haran wrote:
> Just curious, can you provide links to these cases?

No kernel cases ever became public, but the SAMBA team have lots of
public cases where they have successfully handled this type of case.

> I've read the COPYING file at the top of the Linux source tree. I am not
> a lawyer, but I don't see anything in it that would prohibit somebody
> from taking the GPL kernel sources, changing the EXPORT_SYMBOL_GPL()s to
> EXPORT_SYMBOL()s, publishing that modified kernel source as required by
> the GPL license but then keep their module source that uses the now
> non-GPL symbols private. It seems like it should be prohibited in the
> spirit of open source, but I don't see any mention of these symbol
> declarations in the license.

The license does not say anything about this, nor should it.

thanks,

greg k-h

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

* GPL-only symbol Error
  2011-11-23  0:34         ` Jeff Haran
  2011-11-23  0:51           ` Greg KH
@ 2011-11-23  1:09           ` Graeme Russ
  2011-11-23  1:21             ` Jeff Haran
  1 sibling, 1 reply; 20+ messages in thread
From: Graeme Russ @ 2011-11-23  1:09 UTC (permalink / raw)
  To: kernelnewbies

Hi Jeff,

On Wed, Nov 23, 2011 at 11:34 AM, Jeff Haran <jharan@bytemobile.com> wrote:
>> -----Original Message-----
>> From: Greg KH [mailto:greg at kroah.com]
>> Sent: Tuesday, November 22, 2011 2:44 PM
>> To: Jeff Haran; Sengottuvelan S; Kernel Newbies
>> Subject: Re: GPL-only symbol Error
>>
>> On Tue, Nov 22, 2011 at 02:35:24PM -0800, Jeff Haran wrote:
>> > I've seen others when faced with this who build their own kernels
> from
>> > sources just modify the problematic EXPORT_SYMBOL_GPL()s to
>> > EXPORT_SYMBOL()s. I don't know if that is legal. I wouldn't do it
>> > personally. Consult a lawyer before you go down that road.
>>
>> It is not legal and companies have gotten into big trouble by trying
> to
>> do that, or by creating "gpl-condom" kernel modules that wrap gpl-only
>> symbols and export them again. ?Do not do that without the full buy-in
>> from your legal department as they do not want to hear about it from
> an
>> external query first.
>>
>
> Greg,
>
> Just curious, can you provide links to these cases?
>
> I've read the COPYING file at the top of the Linux source tree. I am not
> a lawyer, but I don't see anything in it that would prohibit somebody
> from taking the GPL kernel sources, changing the EXPORT_SYMBOL_GPL()s to
> EXPORT_SYMBOL()s, publishing that modified kernel source as required by
> the GPL license but then keep their module source that uses the now
> non-GPL symbols private. It seems like it should be prohibited in the
> spirit of open source, but I don't see any mention of these symbol
> declarations in the license.

The mere fact that the "gpl-condom" module links to EXPORT_SYMBOL_GPL
functions make it, in and of itself, a GPL module

ergo, there is no such thing as a "gpl-condom" module

Regards,

Graeme

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

* GPL-only symbol Error
  2011-11-23  1:09           ` Graeme Russ
@ 2011-11-23  1:21             ` Jeff Haran
  2011-11-23  1:39               ` Guillaume Knispel
                                 ` (3 more replies)
  0 siblings, 4 replies; 20+ messages in thread
From: Jeff Haran @ 2011-11-23  1:21 UTC (permalink / raw)
  To: kernelnewbies

> -----Original Message-----
> From: Graeme Russ [mailto:graeme.russ at gmail.com]
> Sent: Tuesday, November 22, 2011 5:10 PM
> To: Jeff Haran
> Cc: Greg KH; Sengottuvelan S; Kernel Newbies
> Subject: Re: GPL-only symbol Error
> 
> Hi Jeff,
> 
> On Wed, Nov 23, 2011 at 11:34 AM, Jeff Haran <jharan@bytemobile.com>
> wrote:
> >> -----Original Message-----
> >> From: Greg KH [mailto:greg at kroah.com]
> >> Sent: Tuesday, November 22, 2011 2:44 PM
> >> To: Jeff Haran; Sengottuvelan S; Kernel Newbies
> >> Subject: Re: GPL-only symbol Error
> >>
> >> On Tue, Nov 22, 2011 at 02:35:24PM -0800, Jeff Haran wrote:
> >> > I've seen others when faced with this who build their own kernels
> > from
> >> > sources just modify the problematic EXPORT_SYMBOL_GPL()s to
> >> > EXPORT_SYMBOL()s. I don't know if that is legal. I wouldn't do it
> >> > personally. Consult a lawyer before you go down that road.
> >>
> >> It is not legal and companies have gotten into big trouble by trying
> > to
> >> do that, or by creating "gpl-condom" kernel modules that wrap gpl-only
> >> symbols and export them again. ?Do not do that without the full buy-in
> >> from your legal department as they do not want to hear about it from
> > an
> >> external query first.
> >>
> >
> > Greg,
> >
> > Just curious, can you provide links to these cases?
> >
> > I've read the COPYING file at the top of the Linux source tree. I am not
> > a lawyer, but I don't see anything in it that would prohibit somebody
> > from taking the GPL kernel sources, changing the EXPORT_SYMBOL_GPL()s
> to
> > EXPORT_SYMBOL()s, publishing that modified kernel source as required by
> > the GPL license but then keep their module source that uses the now
> > non-GPL symbols private. It seems like it should be prohibited in the
> > spirit of open source, but I don't see any mention of these symbol
> > declarations in the license.
> 
> The mere fact that the "gpl-condom" module links to EXPORT_SYMBOL_GPL
> functions make it, in and of itself, a GPL module
> 
> ergo, there is no such thing as a "gpl-condom" module
> 
> Regards,
> 
> Graeme

Graeme,

Perhaps, but that's not what I asked about. It seems to me the essence of GPL is that it grants people the right to modify GPL sources like the Linux kernel in any way they want so long as they make those changes available to whoever uses the code in the future. I don't see anything in it that prohibits specific changes. So if I take a symbol that in the sources from kernel.org is declared with EXPORT_SYMBOL_GPL(), make a 1 line change that declares it EXPORT_SYMBOL() and put that on a publically available web site, how have I violated GPL?

Let's say I then ship a product that uses that custom kernel and a non-GPL kernel module of my own writing that only works with the custom kernel, how is that prohibited in the GPL license?

Not that I am planning on doing this and I've never done it in the past, but technically it seems that there would be no violation here.

Thanks,

Jeff Haran

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

* GPL-only symbol Error
  2011-11-23  1:21             ` Jeff Haran
@ 2011-11-23  1:39               ` Guillaume Knispel
  2011-11-23  2:10                 ` Jeff Haran
  2011-11-23  1:56               ` Greg Freemyer
                                 ` (2 subsequent siblings)
  3 siblings, 1 reply; 20+ messages in thread
From: Guillaume Knispel @ 2011-11-23  1:39 UTC (permalink / raw)
  To: kernelnewbies

On Tue, 22 Nov 2011 17:21:46 -0800
"Jeff Haran" <jharan@bytemobile.com> wrote:

> > -----Original Message-----
> > From: Graeme Russ [mailto:graeme.russ at gmail.com]
> > Sent: Tuesday, November 22, 2011 5:10 PM
> > To: Jeff Haran
> > Cc: Greg KH; Sengottuvelan S; Kernel Newbies
> > Subject: Re: GPL-only symbol Error
> > 
> > Hi Jeff,
> > 
> > On Wed, Nov 23, 2011 at 11:34 AM, Jeff Haran <jharan@bytemobile.com>
> > wrote:
> > >> -----Original Message-----
> > >> From: Greg KH [mailto:greg at kroah.com]
> > >> Sent: Tuesday, November 22, 2011 2:44 PM
> > >> To: Jeff Haran; Sengottuvelan S; Kernel Newbies
> > >> Subject: Re: GPL-only symbol Error
> > >>
> > >> On Tue, Nov 22, 2011 at 02:35:24PM -0800, Jeff Haran wrote:
> > >> > I've seen others when faced with this who build their own kernels
> > > from
> > >> > sources just modify the problematic EXPORT_SYMBOL_GPL()s to
> > >> > EXPORT_SYMBOL()s. I don't know if that is legal. I wouldn't do it
> > >> > personally. Consult a lawyer before you go down that road.
> > >>
> > >> It is not legal and companies have gotten into big trouble by trying
> > > to
> > >> do that, or by creating "gpl-condom" kernel modules that wrap gpl-only
> > >> symbols and export them again. ?Do not do that without the full buy-in
> > >> from your legal department as they do not want to hear about it from
> > > an
> > >> external query first.
> > >>
> > >
> > > Greg,
> > >
> > > Just curious, can you provide links to these cases?
> > >
> > > I've read the COPYING file at the top of the Linux source tree. I am not
> > > a lawyer, but I don't see anything in it that would prohibit somebody
> > > from taking the GPL kernel sources, changing the EXPORT_SYMBOL_GPL()s
> > to
> > > EXPORT_SYMBOL()s, publishing that modified kernel source as required by
> > > the GPL license but then keep their module source that uses the now
> > > non-GPL symbols private. It seems like it should be prohibited in the
> > > spirit of open source, but I don't see any mention of these symbol
> > > declarations in the license.
> > 
> > The mere fact that the "gpl-condom" module links to EXPORT_SYMBOL_GPL
> > functions make it, in and of itself, a GPL module
> > 
> > ergo, there is no such thing as a "gpl-condom" module
> > 
> > Regards,
> > 
> > Graeme
> 
> Graeme,
> 
> Perhaps, but that's not what I asked about. It seems to me the essence of GPL is that it grants people the right to modify GPL sources like the Linux kernel in any way they want so long as they make those changes available to whoever uses the code in the future. I don't see anything in it that prohibits specific changes. So if I take a symbol that in the sources from kernel.org is declared with EXPORT_SYMBOL_GPL(), make a 1 line change that declares it EXPORT_SYMBOL() and put that on a publically available web site, how have I violated GPL?
> 
> Let's say I then ship a product that uses that custom kernel and a non-GPL kernel module of my own writing that only works with the custom kernel, how is that prohibited in the GPL license?
> 
> Not that I am planning on doing this and I've never done it in the past, but technically it seems that there would be no violation here.

I guess you can't really take some GPL code from a third party, do some
random paperwork or magic trick that basically constitute an unilateral
declaration from you that what was once considered and clearly
identified as derivatives are not anymore, publish said derivatives
that you pretend are not and do so in an incompatible licence, and get
along with it. On the contrary such behavior would very probably
constitute something like willfulness infringement if such thing is
applicable (but IANAL and so over...)

-- 
Guillaume Knispel
Avencall - 10 bis, rue Lucien Voilin - 92800 Puteaux
Tel. : (+33) 141 389 960

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

* GPL-only symbol Error
  2011-11-23  1:21             ` Jeff Haran
  2011-11-23  1:39               ` Guillaume Knispel
@ 2011-11-23  1:56               ` Greg Freemyer
  2011-11-23  2:17                 ` Jeff Haran
  2011-11-23  2:48               ` Greg KH
       [not found]               ` <1322045488.28603.17.camel@thorin>
  3 siblings, 1 reply; 20+ messages in thread
From: Greg Freemyer @ 2011-11-23  1:56 UTC (permalink / raw)
  To: kernelnewbies

On Tue, Nov 22, 2011 at 8:21 PM, Jeff Haran <jharan@bytemobile.com> wrote:
> Graeme,
>
> Perhaps, but that's not what I asked about. It seems to me the essence of GPL is that it grants people the right to modify GPL sources like the Linux kernel in any way they want so long as they make those changes available to whoever uses the code in the future. I don't see anything in it that prohibits specific changes. So if I take a symbol that in the sources from kernel.org is declared with EXPORT_SYMBOL_GPL(), make a 1 line change that declares it EXPORT_SYMBOL() and put that on a publically available web site, how have I violated GPL?
>
> Let's say I then ship a product that uses that custom kernel and a non-GPL kernel module of my own writing that only works with the custom kernel, how is that prohibited in the GPL license?
>
> Not that I am planning on doing this and I've never done it in the past, but technically it seems that there would be no violation here.
>
> Thanks,
>
> Jeff Haran
>

I assume you know it is against the GPL to remove the license statements.

If I was to write it, the implementation of EXPORT_SYMBOL_GPL() would
have embedded license statements.

Thus if you removed it, you would be removing a license statement and
are in violation of the GPL.

Somehow, I think the kernel legal brains have come up with even better
ideas than I have.

Greg (not KH)

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

* GPL-only symbol Error
  2011-11-23  1:39               ` Guillaume Knispel
@ 2011-11-23  2:10                 ` Jeff Haran
  2011-11-23  2:50                   ` Greg KH
  0 siblings, 1 reply; 20+ messages in thread
From: Jeff Haran @ 2011-11-23  2:10 UTC (permalink / raw)
  To: kernelnewbies

> -----Original Message-----
> From: Guillaume Knispel [mailto:gknispel at proformatique.com]
> Sent: Tuesday, November 22, 2011 5:40 PM
> To: Jeff Haran
> Cc: Graeme Russ; Greg KH; Sengottuvelan S; Kernel Newbies
> Subject: Re: GPL-only symbol Error
> 
> On Tue, 22 Nov 2011 17:21:46 -0800
> "Jeff Haran" <jharan@bytemobile.com> wrote:
> 
> > > -----Original Message-----
> > > From: Graeme Russ [mailto:graeme.russ at gmail.com]
> > > Sent: Tuesday, November 22, 2011 5:10 PM
> > > To: Jeff Haran
> > > Cc: Greg KH; Sengottuvelan S; Kernel Newbies
> > > Subject: Re: GPL-only symbol Error
> > >
> > > Hi Jeff,
> > >
> > > On Wed, Nov 23, 2011 at 11:34 AM, Jeff Haran
> <jharan@bytemobile.com>
> > > wrote:
> > > >> -----Original Message-----
> > > >> From: Greg KH [mailto:greg at kroah.com]
> > > >> Sent: Tuesday, November 22, 2011 2:44 PM
> > > >> To: Jeff Haran; Sengottuvelan S; Kernel Newbies
> > > >> Subject: Re: GPL-only symbol Error
> > > >>
> > > >> On Tue, Nov 22, 2011 at 02:35:24PM -0800, Jeff Haran wrote:
> > > >> > I've seen others when faced with this who build their own kernels
> > > > from
> > > >> > sources just modify the problematic EXPORT_SYMBOL_GPL()s to
> > > >> > EXPORT_SYMBOL()s. I don't know if that is legal. I wouldn't do it
> > > >> > personally. Consult a lawyer before you go down that road.
> > > >>
> > > >> It is not legal and companies have gotten into big trouble by trying
> > > > to
> > > >> do that, or by creating "gpl-condom" kernel modules that wrap gpl-
> only
> > > >> symbols and export them again. ?Do not do that without the full buy-in
> > > >> from your legal department as they do not want to hear about it from
> > > > an
> > > >> external query first.
> > > >>
> > > >
> > > > Greg,
> > > >
> > > > Just curious, can you provide links to these cases?
> > > >
> > > > I've read the COPYING file at the top of the Linux source tree. I am not
> > > > a lawyer, but I don't see anything in it that would prohibit somebody
> > > > from taking the GPL kernel sources, changing the
> EXPORT_SYMBOL_GPL()s
> > > to
> > > > EXPORT_SYMBOL()s, publishing that modified kernel source as required
> by
> > > > the GPL license but then keep their module source that uses the now
> > > > non-GPL symbols private. It seems like it should be prohibited in the
> > > > spirit of open source, but I don't see any mention of these symbol
> > > > declarations in the license.
> > >
> > > The mere fact that the "gpl-condom" module links to
> EXPORT_SYMBOL_GPL
> > > functions make it, in and of itself, a GPL module
> > >
> > > ergo, there is no such thing as a "gpl-condom" module
> > >
> > > Regards,
> > >
> > > Graeme
> >
> > Graeme,
> >
> > Perhaps, but that's not what I asked about. It seems to me the essence of
> GPL is that it grants people the right to modify GPL sources like the Linux
> kernel in any way they want so long as they make those changes available to
> whoever uses the code in the future. I don't see anything in it that prohibits
> specific changes. So if I take a symbol that in the sources from kernel.org is
> declared with EXPORT_SYMBOL_GPL(), make a 1 line change that declares it
> EXPORT_SYMBOL() and put that on a publically available web site, how have I
> violated GPL?
> >
> > Let's say I then ship a product that uses that custom kernel and a non-GPL
> kernel module of my own writing that only works with the custom kernel,
> how is that prohibited in the GPL license?
> >
> > Not that I am planning on doing this and I've never done it in the past, but
> technically it seems that there would be no violation here.
> 
> I guess you can't really take some GPL code from a third party, do some
> random paperwork or magic trick that basically constitute an unilateral
> declaration from you that what was once considered and clearly
> identified as derivatives are not anymore, publish said derivatives
> that you pretend are not and do so in an incompatible licence, and get
> along with it. On the contrary such behavior would very probably
> constitute something like willfulness infringement if such thing is
> applicable (but IANAL and so over...)

If I planned to do this, I wouldn't change the license. The custom kernel sources I posted to the would-be web site would still have the same COPYING file.

You say it can't be done, but so far I've read nothing that convinces me that it would be illegal according to the verbiage of the license.

Again, given the scenario I described, how would the existing GPL2 license file that accompanies the kernel sources prohibit it?

It seems to me that the answer so far is "nothing" and as such the previous assertion that doing this would be illegal is not supported by the law, at least not in the US where I live. Perhaps in other countries the laws of copyright are different, but if there has been anything in these recent international trade agreements that has been successful it has been a standardization of the intellectual property law that governs this kind of thing across different national boundaries.

I personally am all for open source. I wish I could have been more successful in the past at convincing my employers to open up their proprietary modules and push them upstream, if no other reason that it would have made my life easier when kernel changes invalidated their implementation.

But it doesn't do anybody any good to spread misinformation about this topic, particularly with regard to what is and isn't legal.

Jeff Haran

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

* GPL-only symbol Error
  2011-11-23  1:56               ` Greg Freemyer
@ 2011-11-23  2:17                 ` Jeff Haran
  0 siblings, 0 replies; 20+ messages in thread
From: Jeff Haran @ 2011-11-23  2:17 UTC (permalink / raw)
  To: kernelnewbies

> -----Original Message-----
> From: Greg Freemyer [mailto:greg.freemyer at gmail.com]
> Sent: Tuesday, November 22, 2011 5:57 PM
> To: Jeff Haran
> Cc: Graeme Russ; Greg KH; Sengottuvelan S; Kernel Newbies
> Subject: Re: GPL-only symbol Error
> 
> On Tue, Nov 22, 2011 at 8:21 PM, Jeff Haran <jharan@bytemobile.com>
> wrote:
> > Graeme,
> >
> > Perhaps, but that's not what I asked about. It seems to me the
essence of
> GPL is that it grants people the right to modify GPL sources like the
Linux
> kernel in any way they want so long as they make those changes
available to
> whoever uses the code in the future. I don't see anything in it that
prohibits
> specific changes. So if I take a symbol that in the sources from
kernel.org is
> declared with EXPORT_SYMBOL_GPL(), make a 1 line change that declares
it
> EXPORT_SYMBOL() and put that on a publically available web site, how
have I
> violated GPL?
> >
> > Let's say I then ship a product that uses that custom kernel and a
non-GPL
> kernel module of my own writing that only works with the custom
kernel,
> how is that prohibited in the GPL license?
> >
> > Not that I am planning on doing this and I've never done it in the
past, but
> technically it seems that there would be no violation here.
> >
> > Thanks,
> >
> > Jeff Haran
> >
> 
> I assume you know it is against the GPL to remove the license
statements.
> 
> If I was to write it, the implementation of EXPORT_SYMBOL_GPL() would
> have embedded license statements.
> 
> Thus if you removed it, you would be removing a license statement and
> are in violation of the GPL.

Perhaps, but you didn't write it.

The implementation of EXPORT_SYMBOL_GPL() is this:

/* For every exported symbol, place a struct in the __ksymtab section */
#define __EXPORT_SYMBOL(sym, sec)                               \
        extern typeof(sym) sym;                                 \
        __CRC_SYMBOL(sym, sec)                                  \
        static const char __kstrtab_##sym[]                     \
        __attribute__((section("__ksymtab_strings"), aligned(1))) \
        = MODULE_SYMBOL_PREFIX #sym;                            \
        static const struct kernel_symbol __ksymtab_##sym       \
        __used                                                  \
        __attribute__((section("__ksymtab" sec), unused))       \
        = { (unsigned long)&sym, __kstrtab_##sym }

#define EXPORT_SYMBOL_GPL(sym)                                  \
        __EXPORT_SYMBOL(sym, "_gpl")

How does that constitute a legal license document? It's C preprocessor
gibberish that only a software engineer can understand. Law is decided
in courts, in juries of peers, at least the US. Any judge that is asked
to rule on the validity of the above as a legal document would laugh the
attorney out of court.
 
> Somehow, I think the kernel legal brains have come up with even better
> ideas than I have.

I would hope they had, but so far I've seen no evidence to that effect.

Jeff Haran

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

* GPL-only symbol Error
  2011-11-23  1:21             ` Jeff Haran
  2011-11-23  1:39               ` Guillaume Knispel
  2011-11-23  1:56               ` Greg Freemyer
@ 2011-11-23  2:48               ` Greg KH
       [not found]               ` <1322045488.28603.17.camel@thorin>
  3 siblings, 0 replies; 20+ messages in thread
From: Greg KH @ 2011-11-23  2:48 UTC (permalink / raw)
  To: kernelnewbies

On Tue, Nov 22, 2011 at 05:21:46PM -0800, Jeff Haran wrote:
> Perhaps, but that's not what I asked about. It seems to me the essence
> of GPL is that it grants people the right to modify GPL sources like
> the Linux kernel in any way they want so long as they make those
> changes available to whoever uses the code in the future. I don't see
> anything in it that prohibits specific changes. So if I take a symbol
> that in the sources from kernel.org is declared with
> EXPORT_SYMBOL_GPL(), make a 1 line change that declares it
> EXPORT_SYMBOL() and put that on a publically available web site, how
> have I violated GPL?

If you distribute that, nothing.  But if you somehow think that
"protects" your closed source kernel module to now use that symbol
exported by the condom module, you are mistaken.

Again, talk to a lawyer for the details, they are the best ones to
answer this for you, we aren't.

Would you ask a lawyer mailing list for medical questions?

greg k-h

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

* GPL-only symbol Error
  2011-11-23  2:10                 ` Jeff Haran
@ 2011-11-23  2:50                   ` Greg KH
  2011-11-23 18:05                     ` Jeff Haran
  0 siblings, 1 reply; 20+ messages in thread
From: Greg KH @ 2011-11-23  2:50 UTC (permalink / raw)
  To: kernelnewbies

On Tue, Nov 22, 2011 at 06:10:27PM -0800, Jeff Haran wrote:
> But it doesn't do anybody any good to spread misinformation about this
> topic, particularly with regard to what is and isn't legal.

I agree, please don't continue it, but rather, consult a lawyer if you
have further questions.

greg k-h

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

* GPL-only symbol Error
  2011-11-23  2:50                   ` Greg KH
@ 2011-11-23 18:05                     ` Jeff Haran
  2011-11-23 19:32                       ` Greg KH
  0 siblings, 1 reply; 20+ messages in thread
From: Jeff Haran @ 2011-11-23 18:05 UTC (permalink / raw)
  To: kernelnewbies

> -----Original Message-----
> From: Greg KH [mailto:greg at kroah.com]
> Sent: Tuesday, November 22, 2011 6:50 PM
> To: Jeff Haran
> Cc: Guillaume Knispel; Graeme Russ; Sengottuvelan S; Kernel Newbies
> Subject: Re: GPL-only symbol Error
> 
> On Tue, Nov 22, 2011 at 06:10:27PM -0800, Jeff Haran wrote:
> > But it doesn't do anybody any good to spread misinformation about
this
> > topic, particularly with regard to what is and isn't legal.
> 
> I agree, please don't continue it, but rather, consult a lawyer if you
> have further questions.
> 
> greg k-h

You are the one who said it was illegal. To quote your previous post:

"It is not legal and companies have gotten into big trouble by trying to
do that"

I said this:

"I've seen others when faced with this who build their own kernels from
sources just modify the problematic EXPORT_SYMBOL_GPL()s to
EXPORT_SYMBOL()s. I don't know if that is legal. I wouldn't do it
personally. Consult a lawyer before you go down that road."

And when I asked you to provide evidence of the legal trouble you
mentioned, all you could come up with was allusions to legal disputes
regarding a different source package, Samba, which if I understood your
response, never even went to trial. No trial, no legal precedent.

If anybody might be guilty of spreading of misinformation, it's you. All
I have done is expressed personal doubts and asked questions. Maybe
doing this would be illegal, maybe it wouldn't be, that's why I said "I
don't know if that is legal" but you so far have completely failed to
justify your assertion that it is illegal.

At least that's my legal layman's personal opinion,

Jeff Haran

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

* GPL-only symbol Error
       [not found]               ` <1322045488.28603.17.camel@thorin>
@ 2011-11-23 18:31                 ` Jeff Haran
  2011-11-23 19:28                   ` Greg KH
  0 siblings, 1 reply; 20+ messages in thread
From: Jeff Haran @ 2011-11-23 18:31 UTC (permalink / raw)
  To: kernelnewbies

> -----Original Message-----
> From: Bernd Petrovitsch [mailto:bernd at petrovitsch.priv.at]
> Sent: Wednesday, November 23, 2011 2:51 AM
> To: Sengottuvelan S
> Cc: Graeme Russ; Greg KH; Kernel Newbies; Jeff Haran
> Subject: RE: GPL-only symbol Error
> 
> On Die, 2011-11-22 at 17:21 -0800, Jeff Haran wrote:
> [....]
> > Perhaps, but that's not what I asked about. It seems to me the essence
> > of GPL is that it grants people the right to modify GPL sources like
> > the Linux kernel in any way they want so long as they make those
> > changes available to whoever uses the code in the future. I don't see
> 
> You forgot that you also have the hand out the same rights you have to
> other people with the (changed) source.
> You forgot that all of that also holds for all of your changes, removal
> and additions to that code (and lawyers don't care if the changes good,
> bad or ugly).

Which is what I suggested in the hypothetical scenario I described. The change to the kernel source to change an EXPORT_SYMBOL_GPL() to EXPORT_SYMBOL() would be published.
 
> >  anything in it that prohibits specific changes. So if I take a symbol
> > that in the sources from kernel.org is declared with
> > EXPORT_SYMBOL_GPL(), make a 1 line change that declares it
> > EXPORT_SYMBOL() and put that on a publically available web site, how
> > have I violated GPL?
> 
> IANAL (and there are pretty much no non-lurking lawyers on LKML), but
> you probably didn't violate the GPL as such on the kernel you downloaded
> with such a change. But that hasn't anything to do with the legal side -
> ask a lawyer if can change the legal "status" with such a change.

Just to be clear, I haven't done any of this. This thread originated with somebody else asking why he was getting this build error when he attempted to build his non-GPL module that referenced EXPORT_SYMBOL_GPL() exported symbols. I was attempting to explain to that original poster why he was getting the error.
 
> > Let's say I then ship a product that uses that custom kernel and a
> > non-GPL kernel module of my own writing that only works with the
> > custom kernel, how is that prohibited in the GPL license?
> 
> That's the actual bug: You assume that you can legally make a
> proprietary Linux kernel module by simply declaring to do so (and going
> deeper is not quite possible as we do not know the module ....).

I can clearly legally write a user space program that results in calls to kernel symbols without publishing it. To do that I load parameters into registers and onto the stack and issue a trap to generate a system call. A kernel module does almost the same thing, except instead of generating a trap, it makes a more traditional function call. The difference is technical and I don't see anything in the COPYING file that makes any reference to this difference. If I have missed that verbiage in the license, please point it out to me.

> Than you stumbled on a warning to help you to realize that (and not
> hitting such warnings or plain simply removing them doesn't change
> anything on the legal side IMHNLO).
> And you think you can "fix" the warning by simply removing it (ignoring
> the underlying issue).

Again, it I didn't stumble on this warning. The original poster did. All I did was respond to a post on a public email list.
 
> But your kernel module is very probably a derived work of the Linux
> kernel anyway and thus automatically and implicitly GPL (even if your
> whole company may want it, has been told or think otherwise).

"very probably a derived work". That is a big assumption. What in the license defines all code that makes calls into kernel symbols via the dynamic module loader mechanism different than code that calls into that code via a trap?
 
> > Not that I am planning on doing this and I've never done it in the
> > past, but technically it seems that there would be no violation here.
> 
> Technically, your module is a derived work of the Linux kernel unless
> proven otherwise.

Again, not my module, not my company's module. I was simply answering a post to this email list and asking questions around a hypothetical scenario.

Jeff Haran

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

* GPL-only symbol Error
  2011-11-23 18:31                 ` Jeff Haran
@ 2011-11-23 19:28                   ` Greg KH
  0 siblings, 0 replies; 20+ messages in thread
From: Greg KH @ 2011-11-23 19:28 UTC (permalink / raw)
  To: kernelnewbies

On Wed, Nov 23, 2011 at 10:31:19AM -0800, Jeff Haran wrote:
> > That's the actual bug: You assume that you can legally make a
> > proprietary Linux kernel module by simply declaring to do so (and going
> > deeper is not quite possible as we do not know the module ....).
> 
> I can clearly legally write a user space program that results in calls
> to kernel symbols without publishing it. To do that I load parameters
> into registers and onto the stack and issue a trap to generate a
> system call. A kernel module does almost the same thing, except
> instead of generating a trap, it makes a more traditional function
> call. The difference is technical and I don't see anything in the
> COPYING file that makes any reference to this difference. If I have
> missed that verbiage in the license, please point it out to me.

Please read the first paragraph in the COPYING file in the kernel, it
explains the differences and allows for userspace programs to not be
bound under the license of the rest of the kernel.

> > But your kernel module is very probably a derived work of the Linux
> > kernel anyway and thus automatically and implicitly GPL (even if your
> > whole company may want it, has been told or think otherwise).
> 
> "very probably a derived work". That is a big assumption. What in the
> license defines all code that makes calls into kernel symbols via the
> dynamic module loader mechanism different than code that calls into
> that code via a trap?

Again the very license of the kernel itself does that.

greg k-h

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

* GPL-only symbol Error
  2011-11-23 18:05                     ` Jeff Haran
@ 2011-11-23 19:32                       ` Greg KH
  0 siblings, 0 replies; 20+ messages in thread
From: Greg KH @ 2011-11-23 19:32 UTC (permalink / raw)
  To: kernelnewbies

On Wed, Nov 23, 2011 at 10:05:19AM -0800, Jeff Haran wrote:
> > -----Original Message-----
> > From: Greg KH [mailto:greg at kroah.com]
> > Sent: Tuesday, November 22, 2011 6:50 PM
> > To: Jeff Haran
> > Cc: Guillaume Knispel; Graeme Russ; Sengottuvelan S; Kernel Newbies
> > Subject: Re: GPL-only symbol Error
> > 
> > On Tue, Nov 22, 2011 at 06:10:27PM -0800, Jeff Haran wrote:
> > > But it doesn't do anybody any good to spread misinformation about
> this
> > > topic, particularly with regard to what is and isn't legal.
> > 
> > I agree, please don't continue it, but rather, consult a lawyer if you
> > have further questions.
> > 
> > greg k-h
> 
> You are the one who said it was illegal. To quote your previous post:
> 
> "It is not legal and companies have gotten into big trouble by trying to
> do that"
> 
> I said this:
> 
> "I've seen others when faced with this who build their own kernels from
> sources just modify the problematic EXPORT_SYMBOL_GPL()s to
> EXPORT_SYMBOL()s. I don't know if that is legal. I wouldn't do it
> personally. Consult a lawyer before you go down that road."
> 
> And when I asked you to provide evidence of the legal trouble you
> mentioned, all you could come up with was allusions to legal disputes
> regarding a different source package, Samba, which if I understood your
> response, never even went to trial. No trial, no legal precedent.

So you feel that only if something goes to trial, is it considered
"legal"?

If so, sorry, I'm not going to be able to help you out here, as every
company that has done this type of thing, when confronted with it, has
said something to the affect of "oops, you are right, we will fix it."
This kind of makes me assume that this type of statement is correct,
right?

> If anybody might be guilty of spreading of misinformation, it's you.

I have spread no misinformation, again, SAMBA has publicly listed cases
where this type of thing has been held up, the kernel instances of this
are not public just because there was no need to because the companies
involved changed their ways when asked to.

> All I have done is expressed personal doubts and asked questions.
> Maybe doing this would be illegal, maybe it wouldn't be, that's why I
> said "I don't know if that is legal" but you so far have completely
> failed to justify your assertion that it is illegal.

The fact that companies change their behavior is a good indication that
this is not allowed, right?  Otherwise, why would they change?

Anyway, this is going nowhere, the original poster needs to consult
their legal department about this issue, nothing we can do here.

greg k-h

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

end of thread, other threads:[~2011-11-23 19:32 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-22 21:48 GPL-only symbol Error Sengottuvelan S
2011-11-22 21:53 ` Jeff Haran
2011-11-22 22:08   ` Sengottuvelan S
2011-11-22 22:34     ` Greg KH
2011-11-22 22:35     ` Jeff Haran
2011-11-22 22:44       ` Greg KH
2011-11-23  0:34         ` Jeff Haran
2011-11-23  0:51           ` Greg KH
2011-11-23  1:09           ` Graeme Russ
2011-11-23  1:21             ` Jeff Haran
2011-11-23  1:39               ` Guillaume Knispel
2011-11-23  2:10                 ` Jeff Haran
2011-11-23  2:50                   ` Greg KH
2011-11-23 18:05                     ` Jeff Haran
2011-11-23 19:32                       ` Greg KH
2011-11-23  1:56               ` Greg Freemyer
2011-11-23  2:17                 ` Jeff Haran
2011-11-23  2:48               ` Greg KH
     [not found]               ` <1322045488.28603.17.camel@thorin>
2011-11-23 18:31                 ` Jeff Haran
2011-11-23 19:28                   ` Greg KH

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).