login
Header Space

 
 

[PATCH] 2.6.25-rc2-mm1 - fix mcount GPL bogosity.

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Andrew Morton <akpm@...>, Steven Rostedt <srostedt@...>, Ingo Molnar <mingo@...>, Arnaldo Carvalho de Melo <acme@...>
Cc: <linux-kernel@...>
Date: Monday, February 25, 2008 - 1:59 pm

The symbol 'mcount' has EXPORT_SYMBOL_GPL attached to it.  This is because
"things that use this symbol are too chummy with kernel internals to not be
derivative".  However, the symbol may or may not actually be referenced by a
given module, depending on the setting of CONFIG_FTRACE.  This leads to an
interesting result:  The module may or may not be too chummy depending on a
variable outside its control, and the module source code doesn't have any say
in the matter.  So we have a .c file that *is* a derivative work if the kernel
is built one way, and is *not* if the kernel is built another.  Worse yet,
it *also* depends at runtime on the setting of /proc/sys/kernel/ftrace_enabled

But it's the SAME EXACT SOURCE.  And since the source file isn't called
schrodinger.c, I believe the following patch is in order..

(As an aside, arch/um/kernel/gprof_syms.c already lists mcount as a
SYMBOL, not a SYMBOL_GPL - yet another inconsistency.

Signed-off-by: Valdis Kletnieks <valdis.kletnieks@vt.edu>
---
--- linux-2.6.25-rc2-mm1/kernel/trace/ftrace.c.dist	2008-02-16 23:34:36.000000000 -0500
+++ linux-2.6.25-rc2-mm1/kernel/trace/ftrace.c	2008-02-25 12:00:57.000000000 -0500
@@ -44,7 +44,7 @@ static struct ftrace_ops *ftrace_list __
 ftrace_func_t ftrace_trace_function __read_mostly = ftrace_stub;
 
 /* mcount is defined per arch in assembly */
-EXPORT_SYMBOL_GPL(mcount);
+EXPORT_SYMBOL(mcount);
 
 notrace void ftrace_list_func(unsigned long ip, unsigned long parent_ip)
 {

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] 2.6.25-rc2-mm1 - fix mcount GPL bogosity., , (Mon Feb 25, 1:59 pm)
Re: [PATCH] 2.6.25-rc2-mm1 - fix mcount GPL bogosity., Steven Rostedt, (Mon Feb 25, 2:23 pm)
RE: [PATCH] 2.6.25-rc2-mm1 - fix mcount GPL bogosity., David Schwartz, (Mon Feb 25, 9:30 pm)
Re: [PATCH] 2.6.25-rc2-mm1 - fix mcount GPL bogosity., Krzysztof Halasa, (Tue Feb 26, 11:43 am)
RE: [PATCH] 2.6.25-rc2-mm1 - fix mcount GPL bogosity., David Schwartz, (Tue Feb 26, 2:19 pm)
Re: [PATCH] 2.6.25-rc2-mm1 - fix mcount GPL bogosity., Krzysztof Halasa, (Tue Feb 26, 7:13 pm)
Re: [PATCH] 2.6.25-rc2-mm1 - fix mcount GPL bogosity., Krzysztof Halasa, (Wed Feb 27, 6:55 am)
RE: [PATCH] 2.6.25-rc2-mm1 - fix mcount GPL bogosity., David Schwartz, (Tue Feb 26, 7:35 pm)
Re: [PATCH] 2.6.25-rc2-mm1 - fix mcount GPL bogosity., Krzysztof Halasa, (Tue Feb 26, 8:05 pm)
RE: [PATCH] 2.6.25-rc2-mm1 - fix mcount GPL bogosity., David Schwartz, (Tue Feb 26, 8:28 pm)
Re: [PATCH] 2.6.25-rc2-mm1 - fix mcount GPL bogosity., Krzysztof Halasa, (Tue Feb 26, 1:04 pm)
Re: [PATCH] 2.6.25-rc2-mm1 - fix mcount GPL bogosity., Krzysztof Halasa, (Tue Feb 26, 1:44 pm)
Re: [PATCH] 2.6.25-rc2-mm1 - fix mcount GPL bogosity., Adrian Bunk, (Mon Feb 25, 3:27 pm)
Re: [PATCH] 2.6.25-rc2-mm1 - fix mcount GPL bogosity., Adrian Bunk, (Mon Feb 25, 4:09 pm)
speck-geostationary