From: "dsmith at redhat dot com" <sourceware-bugzilla@sourceware.org>
To: systemtap@sourceware.org
Subject: [Bug tapsets/15961] New: nd_syscall.exp failure on i686
Date: Mon, 16 Sep 2013 21:30:00 -0000 [thread overview]
Message-ID: <bug-15961-6586@http.sourceware.org/bugzilla/> (raw)
https://sourceware.org/bugzilla/show_bug.cgi?id=15961
Bug ID: 15961
Summary: nd_syscall.exp failure on i686
Product: systemtap
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: tapsets
Assignee: systemtap at sourceware dot org
Reporter: dsmith at redhat dot com
The nd_syscall.exp testcase gets a failure on i686 RHEL6
(2.6.32-358.18.1.el6.i686) in the 'trunc' test:
FAIL: 32-bit trunc nd_syscall
This failure is because systemtap is getting the wrong value for the 'length'
convenience variable from the nd_syscall.truncate probe. Here's the source for
nd_syscall.truncate:
====
probe nd_syscall.truncate = kprobe.function("sys_truncate") ?,
kprobe.function("sys_truncate64") ?
{
name = "truncate"
// path_uaddr = $path
// path = user_string($path)
// length = $length
// argstr = sprintf("%s, %d", user_string_quoted($path), $length)
asmlinkage()
path_uaddr = pointer_arg(1)
path = user_string_quoted(path_uaddr)
if (symname(addr()) == "sys_truncate")
length = ulong_arg(2)
else
length = longlong_arg(2)
argstr = sprintf("%s, %d", user_string_quoted(path_uaddr), length)
}
====
The problem here was that a probe on "sys_truncate" was installed, but
'symname(addr())' failed, so that the wrong value was grabbed for 'length'.
'symname(addr())' shouldn't have failed, but that's a lot of work to do just to
figure out which function is being called. A call to 'ppfunc()' might be better
or breaking down the probe a bit more like the following (untested):
====
probe nd_syscall.truncate = __nd_syscall.truncate ?, __nd_syscall.truncate64 ?
{
name = "truncate"
// path_uaddr = $path
// path = user_string($path)
// length = $length
// argstr = sprintf("%s, %d", user_string_quoted($path), $length)
asmlinkage()
path_uaddr = pointer_arg(1)
path = user_string_quoted(path_uaddr)
argstr = sprintf("%s, %d", user_string_quoted(path_uaddr), length)
}
probe __nd_syscall.truncate = kprobe.function("sys_truncate")
{
asmlinkage()
length = ulong_arg(2)
}
probe __nd_syscall.truncate64 = kprobe.function("sys_truncate64")
{
asmlinkage()
length = longlong_arg(2)
}
====
Note that there are 3 other similar uses of 'symname(addr())' in the nd_syscall
tapset files.
--
You are receiving this mail because:
You are the assignee for the bug.
next reply other threads:[~2013-09-16 21:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-16 21:30 dsmith at redhat dot com [this message]
2013-10-17 14:27 ` [Bug tapsets/15961] " dsmith at redhat dot com
2013-10-17 21:25 ` dsmith at redhat dot com
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=bug-15961-6586@http.sourceware.org/bugzilla/ \
--to=sourceware-bugzilla@sourceware.org \
--cc=systemtap@sourceware.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 read-only IMAP folder(s) and NNTP newsgroup(s).