* Wrapping EXPORT_SYMBOL_GPL symbols and re-exporting the wrappers with EXPORT_SYMBOL
@ 2013-07-01 13:32 Bjørn Mork
2013-07-01 21:38 ` Borislav Petkov
0 siblings, 1 reply; 5+ messages in thread
From: Bjørn Mork @ 2013-07-01 13:32 UTC (permalink / raw)
To: linux-kernel
I just got a new wireless router and stumbled across an odd set of
out-of-tree modules, where two GPL licensed modules were used by a third
proprietary licensed one.
The nice router vendor sent me the GPL'd source code, and as expected
the GPL modules are little more than wrappers working around the
EXPORT_SYMBOL_GPL restrictions. Here's a complete example of one of
them:
/*
* Copyright (C) 2010 silex technology, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/version.h>
#include <linux/workqueue.h>
MODULE_LICENSE("GPL");
MODULE_VERSION("1.0.0");
MODULE_AUTHOR("silex technology, Inc.");
static struct workqueue_struct *sxuptp_wq = NULL;
void sxuptp_wq_init_work(
struct work_struct *work,
void (*fn)(struct work_struct *))
{
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 20)
INIT_WORK(work, (void (*)(void *))fn, work);
#else
INIT_WORK(work, fn);
#endif
}
EXPORT_SYMBOL(sxuptp_wq_init_work);
int sxuptp_wq_enqueue(struct work_struct *work)
{
return queue_work(sxuptp_wq, work);
}
EXPORT_SYMBOL(sxuptp_wq_enqueue);
void sxuptp_wq_flush(void)
{
flush_workqueue(sxuptp_wq);
}
EXPORT_SYMBOL(sxuptp_wq_flush);
static int __init sxuptp_wq_init(void)
{
sxuptp_wq = create_singlethread_workqueue("sxuptp-wq");
if (!sxuptp_wq) {
return -ENOMEM;
}
return 0;
}
static void __exit sxuptp_wq_cleanup(void)
{
destroy_workqueue(sxuptp_wq);
}
module_init(sxuptp_wq_init);
module_exit(sxuptp_wq_cleanup);
create_singlethread_workqueue() expands to __alloc_workqueue_key() which
is EXPORT_SYMBOL_GPL, and flush_workqueue is also EXPORT_SYMBOL_GPL. The
wrapper around the latter can hardly be justified...
Is this sort of thing really acceptable? The 3 symbols exported here
are all used by the proprietary module:
bjorn@nemi:~/tmp$ nm sxuptp.ko|grep _wq
U sxuptp_wq_enqueue
U sxuptp_wq_flush
U sxuptp_wq_init_work
bjorn@nemi:~/tmp$ modinfo sxuptp.ko
filename: /home/bjorn/tmp/sxuptp.ko
author: silex technology, Inc.
version: 1.2.3b2
license: Proprietary
srcversion: B0DEB8927F8F543614E5C47
depends: sxuptp_wq
vermagic: 2.6.36.4 mod_unload modversions ARMv7
parm: netif:Name of the network interface to which the driver is bound (string)
parm: numconn:Number of USB interface connections (read only) (int)
parm: maxconn:Maximum number of USB interface connections (int)
Well, I don't like it one bit. But I am not holding any copyrights
here, and even for those who are the fight is probably not worth it.
I just wanted to share my disgust with this.
And publicly naming the leeching company cannot harm. If I were a router
vendor I'd be really careful about dealing with these guys. They are
most likely crossing a legal line, and if you choose to buy any of their
software then you are taking responsibility. You may get away with it,
but is it really worth the risk?
Bjørn
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: Wrapping EXPORT_SYMBOL_GPL symbols and re-exporting the wrappers with EXPORT_SYMBOL
2013-07-01 13:32 Wrapping EXPORT_SYMBOL_GPL symbols and re-exporting the wrappers with EXPORT_SYMBOL Bjørn Mork
@ 2013-07-01 21:38 ` Borislav Petkov
2013-07-02 7:57 ` richard -rw- weinberger
0 siblings, 1 reply; 5+ messages in thread
From: Borislav Petkov @ 2013-07-01 21:38 UTC (permalink / raw)
To: Bjørn Mork; +Cc: linux-kernel, Rusty Russell
On Mon, Jul 01, 2013 at 03:32:27PM +0200, Bjørn Mork wrote:
> I just got a new wireless router and stumbled across an odd set of
> out-of-tree modules, where two GPL licensed modules were used by a third
> proprietary licensed one.
>
> The nice router vendor sent me the GPL'd source code, and as expected
> the GPL modules are little more than wrappers working around the
> EXPORT_SYMBOL_GPL restrictions. Here's a complete example of one of
> them:
I'm wondering if we could fail building modules which do EXPORT_SYMBOL.
--
Regards/Gruss,
Boris.
Sent from a fat crate under my desk. Formatting is fine.
--
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: Wrapping EXPORT_SYMBOL_GPL symbols and re-exporting the wrappers with EXPORT_SYMBOL
2013-07-01 21:38 ` Borislav Petkov
@ 2013-07-02 7:57 ` richard -rw- weinberger
2013-07-02 8:17 ` Borislav Petkov
2013-07-02 8:47 ` Bjørn Mork
0 siblings, 2 replies; 5+ messages in thread
From: richard -rw- weinberger @ 2013-07-02 7:57 UTC (permalink / raw)
To: Borislav Petkov; +Cc: Bjørn Mork, LKML, Rusty Russell
On Mon, Jul 1, 2013 at 11:38 PM, Borislav Petkov <bp@alien8.de> wrote:
> On Mon, Jul 01, 2013 at 03:32:27PM +0200, Bjørn Mork wrote:
>> I just got a new wireless router and stumbled across an odd set of
>> out-of-tree modules, where two GPL licensed modules were used by a third
>> proprietary licensed one.
>>
>> The nice router vendor sent me the GPL'd source code, and as expected
>> the GPL modules are little more than wrappers working around the
>> EXPORT_SYMBOL_GPL restrictions. Here's a complete example of one of
>> them:
>
> I'm wondering if we could fail building modules which do EXPORT_SYMBOL.
Then vendors will do a s/EXPORT_SYMBOL_GPL/EXPORT_SYMBOL/g on the kernel.
Recently I've identified such a case.
Bjørn, please post this on legal@lists.gpl-violations.org too.
--
Thanks,
//richard
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Wrapping EXPORT_SYMBOL_GPL symbols and re-exporting the wrappers with EXPORT_SYMBOL
2013-07-02 7:57 ` richard -rw- weinberger
@ 2013-07-02 8:17 ` Borislav Petkov
2013-07-02 8:47 ` Bjørn Mork
1 sibling, 0 replies; 5+ messages in thread
From: Borislav Petkov @ 2013-07-02 8:17 UTC (permalink / raw)
To: richard -rw- weinberger; +Cc: Bjørn Mork, LKML, Rusty Russell
On Tue, Jul 02, 2013 at 09:57:08AM +0200, richard -rw- weinberger wrote:
> Then vendors will do a s/EXPORT_SYMBOL_GPL/EXPORT_SYMBOL/g on the kernel.
Huh, "fail building if a module does EXPORT_SYMBOL"...
> Recently I've identified such a case.
Regardless, there's not really a whole lot we can do technically as long
as they go and change the kernel. The EXPORT_SYMBOL_GPL thing protects
only against separately distributed modules but if you deliver the whole
kernel, you can do whatever you want. :-\
--
Regards/Gruss,
Boris.
Sent from a fat crate under my desk. Formatting is fine.
--
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: Wrapping EXPORT_SYMBOL_GPL symbols and re-exporting the wrappers with EXPORT_SYMBOL
2013-07-02 7:57 ` richard -rw- weinberger
2013-07-02 8:17 ` Borislav Petkov
@ 2013-07-02 8:47 ` Bjørn Mork
1 sibling, 0 replies; 5+ messages in thread
From: Bjørn Mork @ 2013-07-02 8:47 UTC (permalink / raw)
To: richard -rw- weinberger; +Cc: Borislav Petkov, LKML, Rusty Russell
richard -rw- weinberger <richard.weinberger@gmail.com> writes:
> On Mon, Jul 1, 2013 at 11:38 PM, Borislav Petkov <bp@alien8.de> wrote:
>> On Mon, Jul 01, 2013 at 03:32:27PM +0200, Bjørn Mork wrote:
>>> I just got a new wireless router and stumbled across an odd set of
>>> out-of-tree modules, where two GPL licensed modules were used by a third
>>> proprietary licensed one.
>>>
>>> The nice router vendor sent me the GPL'd source code, and as expected
>>> the GPL modules are little more than wrappers working around the
>>> EXPORT_SYMBOL_GPL restrictions. Here's a complete example of one of
>>> them:
>>
>> I'm wondering if we could fail building modules which do EXPORT_SYMBOL.
>
> Then vendors will do a s/EXPORT_SYMBOL_GPL/EXPORT_SYMBOL/g on the kernel.
> Recently I've identified such a case.
Well, in this particular case I don't think that would happen. I
believe the router vendor is actually trying their best to comply with
the GPL. They have a well documented and working way to request full
source, and the source I received seems complete and matching the latest
firmware version (as requested).
I believe they are unware of this issue in a minor software component
they have obviously bought from a 3rd party, sold as a SDK with a few
standalone kernel modules . I do believe the router vendor would have
refused if this software required any modifications to the kernel. I
believe the same goes for the SoC vendor which of course is responsible
for most of the firmware, including the kernel.
> Bjørn, please post this on legal@lists.gpl-violations.org too.
Done.
Bjørn
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-07-02 8:47 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-01 13:32 Wrapping EXPORT_SYMBOL_GPL symbols and re-exporting the wrappers with EXPORT_SYMBOL Bjørn Mork
2013-07-01 21:38 ` Borislav Petkov
2013-07-02 7:57 ` richard -rw- weinberger
2013-07-02 8:17 ` Borislav Petkov
2013-07-02 8:47 ` Bjørn Mork
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox