Messages in this thread Patch in this message | | | From | Keith Owens <> | Subject | Re: kallsyms gate page patch breaks module lookups | Date | Tue, 11 Jan 2005 00:44:29 +1100 |
| |
On Mon, 10 Jan 2005 22:13:37 +1100, Anton Blanchard <anton@samba.org> wrote: >Your recent patch looks to break module kallsyms lookups.... >It looks like if CONFIG_KALLSYMS_ALL is set then we never look up module >addresses.
Separate lookups for kernel and modules when CONFIG_KALLSYMS_ALL=y.
Signed-off-by: Keith Owens <kaos@ocs.com.au>
Index: 2.6.10-bk13/kernel/kallsyms.c =================================================================== --- 2.6.10-bk13.orig/kernel/kallsyms.c 2005-01-11 00:42:19.600615731 +1100 +++ 2.6.10-bk13/kernel/kallsyms.c 2005-01-11 00:42:41.520243100 +1100 @@ -53,6 +53,13 @@ static inline int is_kernel_text(unsigne return in_gate_area_no_task(addr); } +static inline int is_kernel(unsigned long addr) +{ + if (addr >= (unsigned long)_stext && addr <= (unsigned long)_end) + return 1; + return in_gate_area_no_task(addr); +} + /* expand a compressed symbol data into the resulting uncompressed string, given the offset to where the symbol is in the compressed stream */ static unsigned int kallsyms_expand_symbol(unsigned int off, char *result) @@ -153,7 +160,8 @@ const char *kallsyms_lookup(unsigned lon namebuf[KSYM_NAME_LEN] = 0; namebuf[0] = 0; - if (all_var || is_kernel_text(addr) || is_kernel_inittext(addr)) { + if ((all_var && is_kernel(addr)) || + (!all_var && (is_kernel_text(addr) || is_kernel_inittext(addr)))) { unsigned long symbol_end=0; /* do a binary search on the sorted kallsyms_addresses array */ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |