RE: GPL-only symbol Error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Sengottuvelan S [mailto:sengottuvelan.s@xxxxxxxxx] 
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@xxxxxxxxxxxxxx> wrote:
 From: kernelnewbies-bounces@xxxxxxxxxxxxxxxxx [mailto:kernelnewbies-bounces@xxxxxxxxxxxxxxxxx] 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




_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux