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:	Thu, 28 May 2009 15:23:59 -0400 (EDT)
From:	Steven Rostedt <rostedt@...dmis.org>
To:	Thomas Gleixner <tglx@...utronix.de>
cc:	Frederic Weisbecker <fweisbec@...il.com>,
	LKML <linux-kernel@...r.kernel.org>, Ingo Molnar <mingo@...e.hu>
Subject: Re: [PATCH] tracing: annotate emit_log_char() notrace



On Thu, 28 May 2009, Thomas Gleixner wrote:

> On Thu, 28 May 2009, Steven Rostedt wrote:
> > > IIRC the same happens with a serial console, but that can be worse as
> > > you busy wait during the character output.
> > > 
> > > It'd be nice if we could inherit the notrace from the caller :)
> > > 
> > 
> > I'd hate to make rcu_read_*lock be a notrace. I've done some debugging 
> > with wanting to know where the rcu locks were taken.
> 
> Sure.
>  
> > I'm sure there's lots of functions that people will want to add notrace 
> > for. Really, the notrace on a function should only be there to prevent 
> > crashes (functions used by the tracer or early boot up code for some 
> > archs).
> 
> Well, lets look at the atomic notifier then. Why is it notrace ? And
> if there is a reason why does it trace the calls which are done inside
> of it. We should really think about inheriting the notrace down the
> call chain at least for those calls which must be annotated to avoid
> wreckage. That could then be made optional (via commandline) for all
> notrace calls.

Every function marked with __kprobes becomes notrace, which atomic 
notifier is.

We probably can even remove that now. Ingo added it when we had the issue 
with the NMI causing lockups. See 36dcd67ae994fece615b7c700958d215e884b9ae
But we have since fixed the NMI issues.

Also, there's no real way to inherit notrace automatically. Well we could 
write some really nasty scripts to try it at compile time. notrace is 
simply an attribute in gcc to prevent it from calling mcount.

> 
> > That said, there are times when you want to avoid tracing things on early 
> > boot up. Thus, if someone adds to the kernel command line 
> > "ftrace=function" you have no way to filter out these functions you don't 
> > care about.
> > 
> > What if I add a "ftrace_notrace=<function list>" kernel command line, that 
> > has <function list> be a comma separated list of functions you want to go 
> > into the "set_ftrace_notrace" on boot up? Would that satisfy you. Then you 
> > can keep adding to the list dynamically every boot. And keep it there in a 
> > grub file.
> 
> That list might grow fast beyond the command line lenght limit :)
> 
> But yeah, I can see your point. At least it would be better than
> cursing and adding ad hoc notrace patches all over the place.
> 

Well, the boot options still allow for simple wild cards. So hopefully the 
list will not grow too much. You can also just add a list of functions 
that you want to trace (filter as suppose to notrace).

If you are tracing after boot up, then you can add the list to a start up 
script and just echo into the set_ftrace_notrace file.

-- Steve

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