diff options
author | Robin Getz <rgetz@blackfin.uclinux.org> | 2008-02-06 04:36:26 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-06 13:41:01 -0500 |
commit | a3b81113fb6658629f4ebaabf8dd3067cd341020 (patch) | |
tree | c6823e84d410f18b110ce07726643d7dc841553d /kernel/kallsyms.c | |
parent | 0a5dcb51770be3cd0202d6b90a07996fb40130b6 (diff) |
remove support for un-needed _extratext section
When passing a zero address to kallsyms_lookup(), the kernel thought it was
a valid kernel address, even if it is not. This is because is_ksym_addr()
called is_kernel_extratext() and checked against labels that don't exist on
many archs (which default as zero). Since PPC was the only kernel which
defines _extra_text, (in 2005), and no longer needs it, this patch removes
_extra_text support.
For some history (provided by Jon):
http://ozlabs.org/pipermail/linuxppc-dev/2005-September/019734.html
http://ozlabs.org/pipermail/linuxppc-dev/2005-September/019736.html
http://ozlabs.org/pipermail/linuxppc-dev/2005-September/019751.html
[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Robin Getz <rgetz@blackfin.uclinux.org>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Jon Loeliger <jdl@freescale.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/kallsyms.c')
-rw-r--r-- | kernel/kallsyms.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/kernel/kallsyms.c b/kernel/kallsyms.c index 7dadc71ce516..f091d13def00 100644 --- a/kernel/kallsyms.c +++ b/kernel/kallsyms.c | |||
@@ -53,14 +53,6 @@ static inline int is_kernel_inittext(unsigned long addr) | |||
53 | return 0; | 53 | return 0; |
54 | } | 54 | } |
55 | 55 | ||
56 | static inline int is_kernel_extratext(unsigned long addr) | ||
57 | { | ||
58 | if (addr >= (unsigned long)_sextratext | ||
59 | && addr <= (unsigned long)_eextratext) | ||
60 | return 1; | ||
61 | return 0; | ||
62 | } | ||
63 | |||
64 | static inline int is_kernel_text(unsigned long addr) | 56 | static inline int is_kernel_text(unsigned long addr) |
65 | { | 57 | { |
66 | if (addr >= (unsigned long)_stext && addr <= (unsigned long)_etext) | 58 | if (addr >= (unsigned long)_stext && addr <= (unsigned long)_etext) |
@@ -80,8 +72,7 @@ static int is_ksym_addr(unsigned long addr) | |||
80 | if (all_var) | 72 | if (all_var) |
81 | return is_kernel(addr); | 73 | return is_kernel(addr); |
82 | 74 | ||
83 | return is_kernel_text(addr) || is_kernel_inittext(addr) || | 75 | return is_kernel_text(addr) || is_kernel_inittext(addr); |
84 | is_kernel_extratext(addr); | ||
85 | } | 76 | } |
86 | 77 | ||
87 | /* expand a compressed symbol data into the resulting uncompressed string, | 78 | /* expand a compressed symbol data into the resulting uncompressed string, |