mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Frederic Weisbecker <fweisbec@gmail.com>
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: Sat, 27 Feb 2010 14:25:03 -0500	[thread overview]
Message-ID: <1267298703.6328.181.camel@gandalf.stny.rr.com> (raw)
In-Reply-To: <20100227100223.GB5130@nowhere>

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.

> 
> > +			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.

-- Steve

> >  	}
> >  


  reply	other threads:[~2010-02-27 19:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-27  0:27 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 [this message]
2010-02-28 18:16     ` Frederic Weisbecker

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=1267298703.6328.181.camel@gandalf.stny.rr.com \
    --to=rostedt@goodmis.org \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --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

all inboxes | Powered by JetHome®