From: Jim Keniston <jkenisto@us.ibm.com>
To: "Frank Ch. Eigler" <fche@redhat.com>
Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com>,
systemtap@sources.redhat.com
Subject: Re: [WIP] uprobe tests
Date: Mon, 11 Jun 2007 19:57:00 -0000 [thread overview]
Message-ID: <1181588232.3739.28.camel@ibm-ni9dztukfq8.beaverton.ibm.com> (raw)
In-Reply-To: <1181429722.3661.33.camel@ibm-ni9dztukfq8.beaverton.ibm.com>
On Sat, 2007-06-09 at 15:55 -0700, Jim Keniston wrote:
> On Sat, 2007-06-09 at 17:01 -0400, Frank Ch. Eigler wrote:
> > Srikar Dronamraju <srikar@linux.vnet.ibm.com> writes:
> >
...
> >
> > When I run this test suite on i686 2.6.21-rc6-mm1 + may25-uprobes
> > kernel configured with a bunch of debugging options, we get a bunch of
> > kernel errors. A sampling:
>
...
>
> Most of these problems appear to be associated with the test harness
> (which includes u_dbfs_cleanup), but there's one associated with
> register_uprobe().
...
> >
> > slab error in verify_redzone_free(): cache `size-32': memory outside object was
> > overwritten
> > [<c04787f2>] cache_free_debugcheck+0xb2/0x1a6
> > [<c0478b5e>] kfree+0x90/0xe0
> > [<f098208b>] u_dbfs_cleanup+0x4b/0x4d [blink2]
> > [<f09820d6>] cleanup_module+0x49/0x4b [blink2]
...
I rebuilt kernels with Frank's debugging options enabled. Here's a
simple fix that yields clean test runs for me. In the test suite, in
include/udbgfs.c, in the line
print_buf = kmalloc(sizeof(print_buf),GFP_KERNEL);
change
sizeof(print_buf)
to
sizeof(*print_buf)
BTW, I don't think test_printk() handles buffer overflows correctly.
When we reach the end of the buffer, it's possible for vsnprintf() to
return a number greater than print_buf->bytes_left (see "Return value"
in the man page), which means print_buf->bytes_left can underflow to a
very big number, telling the next call to vsnprintf() that we have a
very big buffer. I don't see any overflows in the test suite that would
test my hypothesis, though, so I'll leave that investigation and fix to
Srikar.
> >
> >
> > - FChE
Jim
next prev parent reply other threads:[~2007-06-11 19:57 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-05 13:06 Srikar Dronamraju
2007-06-07 13:42 ` Srikar Dronamraju
2007-06-09 21:01 ` Frank Ch. Eigler
2007-06-09 23:55 ` Jim Keniston
2007-06-11 19:57 ` Jim Keniston [this message]
2007-06-12 15:08 ` Srikar Dronamraju
2007-06-15 8:44 ` utrace & systemtap scripts Wenji Huang
2007-06-15 9:22 ` Roland McGrath
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=1181588232.3739.28.camel@ibm-ni9dztukfq8.beaverton.ibm.com \
--to=jkenisto@us.ibm.com \
--cc=fche@redhat.com \
--cc=srikar@linux.vnet.ibm.com \
--cc=systemtap@sources.redhat.com \
/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).