From: Frederic Weisbecker <fweisbec@gmail.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: LKML <linux-kernel@vger.kernel.org>, Ingo Molnar <mingo@elte.hu>,
Tim Bird <tim.bird@am.sony.com>
Subject: Re: [PATCH][GIT PULL] ftrace: Add function names to dangling } in function graph tracer
Date: Sun, 28 Feb 2010 19:16:27 +0100 [thread overview]
Message-ID: <20100228181622.GB5248@nowhere> (raw)
In-Reply-To: <1267298703.6328.181.camel@gandalf.stny.rr.com>
On Sat, Feb 27, 2010 at 02:25:03PM -0500, Steven Rostedt wrote:
> On Sat, 2010-02-27 at 11:02 +0100, Frederic Weisbecker wrote:
>
> > > /*
> > > * Comments display at + 1 to depth. Since
> > > * this is a leaf function, keep the comments
> > > * equal to this depth.
> > > */
> > > - *depth = call->depth - 1;
> > > + cpu_data->depth = call->depth - 1;
> > > +
> > > + /* No need to keep this function around for this depth */
> > > + if (call->depth < FTRACE_RETFUNC_DEPTH)
> >
> >
> >
> > Do you really need to check that? call->depth >= FTRACE_RETFUNC_DEPTH
> > are not recorded.
> >
> >
>
> Call me paranoid, but working inside the kernel makes me paranoid. If
> for some reason a trace gets corrupted here, not doing this check can
> cause a kernel oops.
Ok but this may also hide a bug.
Could it be a WARN_ON_ONCE?
> >
> > > + cpu_data->enter_funcs[call->depth] = 0;
>
> cpu_data->enter_funcs[102340320211] = 0;
>
> would be bad ;-)
>
>
> Hmm, I should also make sure depth is not less than zero. I'll send a
> new patch to do that too.
With a WARN_ON_ONCE? :)
Thanks.
prev parent reply other threads:[~2010-02-28 18:16 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-27 0:27 [PATCH][GIT PULL] ftrace: Add function names to dangling } in function graph tracer Steven Rostedt
2010-02-27 9:43 ` Ingo Molnar
2010-02-27 10:04 ` Frederic Weisbecker
2010-02-27 19:19 ` Steven Rostedt
2010-02-27 10:02 ` Frederic Weisbecker
2010-02-27 19:25 ` Steven Rostedt
2010-02-28 18:16 ` Frederic Weisbecker [this message]
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=20100228181622.GB5248@nowhere \
--to=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=rostedt@goodmis.org \
--cc=tim.bird@am.sony.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