public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@steeleye.com>
To: Rusty Russell <rusty@rustcorp.com.au>,
	Kai Germaschewski <kai@tp1.ruhr-uni-bochum.de>
Cc: Linux Kernel <linux-kernel@vger.kernel.org>
Subject: [PATCH] fix for kallsyms module symbol resolution problem
Date: 27 Jun 2003 22:26:27 -0500	[thread overview]
Message-ID: <1056770789.1825.200.camel@mulgrave> (raw)

[-- Attachment #1: Type: text/plain, Size: 532 bytes --]

In lots of KALLSYMS symbol resolution in modules, I've noticed the
appearance of symbols with no names:

Jun 27 20:55:26 raven kernel:  [<10131440>] schedule_timeout+0x78/0xdc
Jun 27 20:55:26 raven kernel:  [<000f8240>] +0x4e0/0x598 [sunrpc]
Jun 27 20:55:26 raven kernel:  [<0014504c>] +0x150/0x43c [nfsd]
Jun 27 20:55:26 raven kernel:  [<10109c5c>] ret_from_kernel_thread+0x1c/0x24

The problem seems to be that get_ksymbol doesn't eliminate empty symbol
names when it does resolution.  The attached patch should fix this.

James


[-- Attachment #2: tmp.diff --]
[-- Type: text/plain, Size: 518 bytes --]

===== kernel/module.c 1.87 vs edited =====
--- 1.87/kernel/module.c	Sat Jun 14 11:16:06 2003
+++ edited/kernel/module.c	Fri Jun 27 22:10:58 2003
@@ -1760,7 +1760,8 @@
 			continue;
 
 		if (mod->symtab[i].st_value <= addr
-		    && mod->symtab[i].st_value > mod->symtab[best].st_value)
+		    && mod->symtab[i].st_value > mod->symtab[best].st_value
+		    && *(mod->strtab + mod->symtab[i].st_name) != '\0')
 			best = i;
 		if (mod->symtab[i].st_value > addr
 		    && mod->symtab[i].st_value < nextval)

             reply	other threads:[~2003-06-28  3:15 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-28  3:26 James Bottomley [this message]
2003-06-30  2:06 ` [PATCH] fix for kallsyms module symbol resolution problem Rusty Russell
2003-06-30  3:13   ` James Bottomley
2003-06-30  6:17     ` Rusty Russell
2003-06-30 14:10       ` James Bottomley
2003-07-01  1:11         ` Rusty Russell
2003-07-01  2:24       ` James Bottomley
2003-07-01  4:58         ` Rusty Russell

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=1056770789.1825.200.camel@mulgrave \
    --to=james.bottomley@steeleye.com \
    --cc=kai@tp1.ruhr-uni-bochum.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rusty@rustcorp.com.au \
    /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