]> www.infradead.org Git - users/jedix/linux-maple.git/commit
kallsyms: fix /proc/kallmodsyms to not be misled by external symbols
authorNick Alcock <nick.alcock@oracle.com>
Fri, 29 May 2015 20:40:20 +0000 (21:40 +0100)
committerNick Alcock <nick.alcock@oracle.com>
Tue, 21 Jul 2015 14:30:11 +0000 (15:30 +0100)
commit59a263cce66d3210d21f5bea57d7f24f9913b63a
tree244aba533008f314cd1cb06e2ef3ff3f1fe9d89b
parentc66319184d4892afc80b1d7417485851ae0b321a
kallsyms: fix /proc/kallmodsyms to not be misled by external symbols

The population of /proc/kallmodsyms is thrown off by external symbols: not only
does it include them in /proc/kallmodsyms even if they have no corresponding
definition, because the relevant definition is not configured in (leading to a
huge number of useless symbols), but it assumes that if the symbol appears
in one built-in module, the symbol is defined there, even if it was declared
'extern'.

This can lead to lunacies such as saved_command_line appearing to come from the
openprom module and stuff like that.  More generally, it can lead to symbols
apparently moving around if extern references to them are added or modules are
added to the kernel configuration, which is clearly unacceptable.

Orabug: 21172433
Signed-off-by: Nick Alcock <nick.alcock@oracle.com>
Reviewed-by: Todd Vierling <todd.vierling@oracle.com>
scripts/kallsyms.c