Skip to contentSkip to conversation

remove EXPORT_SYMBOL(kallsyms_lookup)

PATCH In review Greg KH 4 participants 5 messages Jun 17, 2004

lore
Share & tools
lore

Greg KH

author
#0 lore raw

PATCH 1/1 remove EXPORT_SYMBOL(kallsyms_lookup)

Hi,

Distros have started to ship kernels with this patch, as it seems that some unnamed binary module authors are already abusing this function (as well as some open source modules, like the openib code.) I could not find any valid reason why this symbol should be exported, so here's a patch against 2.6.7 that removes it.

thanks,

greg k-h

kernel/kallsyms.c +0 -1
diff -Nru a/kernel/kallsyms.c b/kernel/kallsyms.c
@@ -320,5 +320,4 @@
 }
 __initcall(kallsyms_init);
 
-EXPORT_SYMBOL(kallsyms_lookup);
 EXPORT_SYMBOL(__print_symbol);
#1 lore raw

Hello!

Greg KH <[email protected]> wrote:
GK> Distros have started to ship kernels with this patch, as it seems that GK> some unnamed binary module authors are already abusing this function (as GK> well as some open source modules, like the openib code.) I could not GK> find any valid reason why this symbol should be exported, so here's a

What if some extra carefully written code detects some (non fatal) problem in itself and decides to dump a decoded backtrace to some internal log buffer, user will find this later and will send a bugreport to developers? (yes, there are problems with simply doing dump_stack()).
Or perhaps we need dump_stack version that will print the dump into a supplied buffer then?

Bye,
Oleg

author
#2 lore raw
Quoted 11 lines · Oleg Drokin

Hello!

Greg KH <[email protected]> wrote:
GK> Distros have started to ship kernels with this patch, as it seems that GK> some unnamed binary module authors are already abusing this function (as GK> well as some open source modules, like the openib code.) I could not GK> find any valid reason why this symbol should be exported, so here's a

What if some extra carefully written code detects some (non fatal) problem in itself and decides to dump a decoded backtrace to some internal log buffer, user will find this later and will send a bugreport to developers?

Do you have an example of code in the current kernel tree that does this? If not, then feel free to bring up the discussion about exporting this symbol at that point in time :)

Quoted 3 lines

(yes, there are problems with simply doing dump_stack()). Or perhaps we need dump_stack version that will print the dump into a supplied buffer then?

That might be useful.

thanks,

greg k-h

#3 lore raw
In reply to Oleg Drokin
Quoted 4 lines · Oleg Drokin

user will find this later and will send a bugreport to developers? (yes, there are problems with simply doing dump_stack()). Or perhaps we need dump_stack version that will print the dump into a supplied buffer then?

Yes, please please please! ;-)

#4 lore raw
In reply to Oleg Drokin
Quoted 2 lines · Oleg Drokin

Or perhaps we need dump_stack version that will print the dump into a supplied buffer then?

That would make it easy to implement /proc/<num>/stack. I think that would be useful.

Signature · 2 lines
David Kleikamp
IBM Linux Technology Center