lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Sun, 28 Feb 2010 19:16:27 +0100
From:	Frederic Weisbecker <fweisbec@...il.com>
To:	Steven Rostedt <rostedt@...dmis.org>
Cc:	LKML <linux-kernel@...r.kernel.org>, Ingo Molnar <mingo@...e.hu>,
	Tim Bird <tim.bird@...sony.com>
Subject: Re: [PATCH][GIT PULL] ftrace: Add function names to dangling } in
	function graph tracer

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.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ