diff options
author | Tim Abbott <tabbott@MIT.EDU> | 2009-01-05 08:40:10 -0600 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2009-01-05 08:40:11 +1030 |
commit | ca4787b779dd698a2a33a328aa5fa90a3e954077 (patch) | |
tree | 678eddc5cfd0b366b1ef5662cf6ccdd7b7b2f135 /include | |
parent | a327ca2c2674c5a9a0073421df19bfc362698136 (diff) |
kernel/module.c: compare symbol values when marking symbols as exported in /proc/kallsyms.
When there are two symbols in a module with the same name, one of which is
exported, both will be marked as exported in /proc/kallsyms. There aren't
any instances of this in the current kernel, but it is easy to construct a
simple module with two compilation units that exhibits the problem.
$ objdump -j .text -t testmod.ko | grep foo
00000000 l F .text 00000032 foo
00000080 g F .text 00000001 foo
$ sudo insmod testmod.ko
$ grep "T foo" /proc/kallsyms
c28e8000 T foo [testmod]
c28e8080 T foo [testmod]
Fix this by comparing the symbol values once we've found the exported
symbol table entry matching the symbol name. Tested using Ksplice:
$ ksplice-create --patch=this_commit.patch --id=bar .
$ sudo ksplice-apply ksplice-bar.tar.gz
Done!
$ grep "T foo" /proc/kallsyms
c28e8080 T foo [testmod]
Signed-off-by: Tim Abbott <tabbott@mit.edu>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions