From: Keith Owens <kaos@ocs.com.au>
To: Anton Blanchard <anton@samba.org>
Cc: akpm@osdl.org, linux-kernel@vger.kernel.org, sam@ravnborg.org
Subject: Re: kallsyms gate page patch breaks module lookups
Date: Tue, 11 Jan 2005 00:44:29 +1100 [thread overview]
Message-ID: <15034.1105364669@ocs3.ocs.com.au> (raw)
In-Reply-To: Your message of "Mon, 10 Jan 2005 22:13:37 +1100." <20050110111337.GM14239@krispykreme.ozlabs.ibm.com>
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 */
next prev parent reply other threads:[~2005-01-10 13:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-10 11:13 kallsyms gate page patch breaks module lookups Anton Blanchard
2005-01-10 13:44 ` Keith Owens [this message]
2005-01-10 16:33 ` Sam Ravnborg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=15034.1105364669@ocs3.ocs.com.au \
--to=kaos@ocs.com.au \
--cc=akpm@osdl.org \
--cc=anton@samba.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sam@ravnborg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).