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

[[email protected]: coding-style fixes]
Signed-off-by: Robin Getz <[email protected]>
Cc: David Woodhouse <[email protected]>
Cc: Jon Loeliger <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Benjamin Herrenschmidt <[email protected]>
Cc: Sam Ravnborg <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
Robin Getz 2008-02-06 01:36:26 -08:00 • committed by Linus Torvalds
commit a3b81113fb
4 changed files with 11 additions and 31 deletions

View file

@ -53,14 +53,6 @@ static inline int is_kernel_inittext(unsigned long addr)
return 0;
}
static inline int is_kernel_extratext(unsigned long addr)
{
if (addr >= (unsigned long)_sextratext
&& addr <= (unsigned long)_eextratext)
return 1;
return 0;
}
static inline int is_kernel_text(unsigned long addr)
{
if (addr >= (unsigned long)_stext && addr <= (unsigned long)_etext)
@ -80,8 +72,7 @@ static int is_ksym_addr(unsigned long addr)
if (all_var)
return is_kernel(addr);
return is_kernel_text(addr) || is_kernel_inittext(addr) ||
is_kernel_extratext(addr);
return is_kernel_text(addr) || is_kernel_inittext(addr);
}
/* expand a compressed symbol data into the resulting uncompressed string,