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
next prev parent reply other threads:[~2004-12-27 13:01 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
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]
-- strict thread matches above, loose matches on Subject: below --
2005-01-24 15:21 gowda_avinash
2005-01-24 15:34 ` Keith Owens
2005-01-25 4:25 ` Saravanan s
2005-01-25 4:44 ` Keith Owens
2005-01-25 5:52 ` Jack F Vogel
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