GPL-only symbol Error
Jeff Haran
jharan at bytemobile.com
Tue Nov 22 21:17:56 EST 2011
> -----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 at 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
More information about the Kernelnewbies
mailing list