remove EXPORT_SYMBOL(kallsyms_lookup)
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
@@ -320,5 +320,4 @@ }__initcall (kallsyms_init); -EXPORT_SYMBOL (kallsyms_lookup);EXPORT_SYMBOL (__print_symbol);
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
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 aWhat 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 needdump_stackversion that will print the dump into a supplied buffer then?
That might be useful.
thanks,
greg k-h
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 needdump_stackversion that will print the dump into a supplied buffer then?
Yes, please please please! ;-)
Quoted 2 lines · Oleg Drokin
Or perhaps we need
dump_stackversion 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