public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
From: Paulo Marques <pmarques@grupopie.com>
To: Keith Owens <kaos@sgi.com>
Cc: kdb@oss.sgi.com, linux-kernel@vger.kernel.org,
	linux-ia64@vger.kernel.org
Subject: Re: Announce: kdb v4.4 is available for kernel 2.6.10
Date: Mon, 27 Dec 2004 13:00:34 +0000	[thread overview]
Message-ID: <41D00772.1050600@grupopie.com> (raw)
In-Reply-To: <18921.1103977059@ocs3.ocs.com.au>

Keith Owens wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> KDB (Linux Kernel Debugger) has been updated.

Hi,

I browsed the patch quickly to check for kallsyms uses, and validate 
them, and it generally seems correct.

There is however one comment that makes me wonder:
*2.6 kallsyms has a "feature" where it unpacks the name into a string.
*If that string is reused before the caller expects it then the caller
*sees its string change without warning.

kallsyms_lookup always uses the buffer passed to it in the case the 
symbol is a kernel symbol, as opposed to a module symbol, and so it is 
not responsible for the buffer.

So this probably only happens when a module symbol is returned directly 
from its symbol table, and then the module is unloaded (or something 
like that).

Later there is another comment:
* Another 2.6 kallsyms "feature".  Sometimes the sym_name is
* set but the buffer passed into kallsyms_lookup is not used,
* so it contains garbage.

It seems to be the same problem. If we modify kallsyms_lookup to always 
use the buffer passed, even if the symbol comes from a module, maybe we 
could solve both problems with just one change.

On the downside, a caller that just wants to print the name, would pay 
an unnecessary string copy.

On the upside, this would make the interface more coherent with standard 
C functions like strcpy, where the buffer passed is always the buffer 
returned.

So, is it worth the change?

-- 
Paulo Marques - www.grupopie.com

"A journey of a thousand miles begins with a single step."
Lao-tzu, The Way of Lao-tzu


  reply	other threads:[~2004-12-27 13:00 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-24  5:48 Announce: kdb v4.4 is available for kernel 2.6.6 Keith Owens
2004-06-07  5:40 ` Announce: kdb v4.4 is available for kernel 2.6.7-rc2 Keith Owens
2004-06-17  1:16 ` Announce: kdb v4.4 is available for kernel 2.6.7 Keith Owens
2004-10-21  3:52 ` Announce: kdb v4.4 is available for kernel 2.6.9 Keith Owens
2004-12-25 12:17 ` Announce: kdb v4.4 is available for kernel 2.6.10 Keith Owens
2004-12-27 13:00   ` Paulo Marques [this message]
2005-01-24 15:21 ` gowda_avinash
2005-01-24 15:34 ` Keith Owens
2005-01-25  4:37   ` Saravanan s
2005-01-25  4:44 ` Keith Owens
2005-01-25  5:52   ` Jack F Vogel
2005-03-03  2:53 ` Announce: kdb v4.4 is available for kernel 2.6.11 Keith Owens
2005-06-18  6:19 ` Announce: kdb v4.4 is available for kernel 2.6.12 Keith Owens
2005-08-29  2:12 ` Announce: kdb v4.4 is available for kernel 2.6.13 Keith Owens
2005-09-20  7:32 ` Announce: kdb v4.4 is available for kernel 2.6.14-rc1 Keith Owens
2005-09-21  6:21 ` Announce: kdb v4.4 is available for kernel 2.6.14-rc2 Keith Owens
2005-10-28  7:29 ` Announce: kdb v4.4 is available for kernel 2.6.14 Keith Owens
2006-01-04  9:10 ` Announce: kdb v4.4 is available for kernel 2.6.15 Keith Owens
2006-01-04 15:04   ` Jeff V. Merkey
2006-03-21  5:59 ` Announce: kdb v4.4 is available for kernel 2.6.16 Keith Owens
2006-03-24  6:21 ` Keith Owens
2006-06-27 11:45 ` Announce: kdb v4.4 is available for kernel 2.6.17 Keith Owens
2006-06-27 12:06   ` Nigel Cunningham
2006-09-20  5:37 ` Announce: kdb v4.4 is available for kernel 2.6.18 Keith Owens

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=41D00772.1050600@grupopie.com \
    --to=pmarques@grupopie.com \
    --cc=kaos@sgi.com \
    --cc=kdb@oss.sgi.com \
    --cc=linux-ia64@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.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