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] [thread-next>] [day] [month] [year] [list]
Message-ID: <1321474379.4502.17.camel@jlt3.sipsolutions.net>
Date:	Wed, 16 Nov 2011 21:12:59 +0100
From:	Johannes Berg <johannes@...solutions.net>
To:	Steven Rostedt <rostedt@...dmis.org>
Cc:	Christoph Hellwig <hch@...radead.org>,
	LKML <linux-kernel@...r.kernel.org>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Ingo Molnar <mingo@...hat.com>
Subject: Re: [PATCH] tracing: add trace console

On Wed, 2011-11-16 at 14:57 -0500, Steven Rostedt wrote:
> On Wed, 2011-11-16 at 19:33 +0100, Johannes Berg wrote:
> > On Wed, 2011-11-16 at 12:00 -0500, Steven Rostedt wrote:
> > > On Wed, 2011-11-16 at 17:45 +0100, Johannes Berg wrote:
> > > 
> > > > I briefly looked at it just after writing the email, but quickly got
> > > > lost in printk.c because of the multi-line handling it has. We could
> > > > instead trace each call to printk(), so the multi-line stuff would end
> > > > up in multiple events, but all of that code is too much vodoo for me :)
> > > 
> > > Here's what can go into printk.c:
> > > 
> > > diff --git a/kernel/printk.c b/kernel/printk.c
> > > index 1455a0d..4b8445a 100644
> > > --- a/kernel/printk.c
> > > +++ b/kernel/printk.c
> > > @@ -542,6 +542,7 @@ MODULE_PARM_DESC(ignore_loglevel, "ignore loglevel setting, to"
> > >  static void _call_console_drivers(unsigned start,
> > >  				unsigned end, int msg_log_level)
> > >  {
> > > +	trace_console(&LOG_BUF(start), end - start);
> > >  	if ((msg_log_level < console_loglevel || ignore_loglevel) &&
> > >  			console_drivers && start != end) {
> > >  		if ((start & LOG_BUF_MASK) > (end & LOG_BUF_MASK)) {
> > > 
> > > 
> > > And then you can make a TRACE_EVENT(console) that takes a buffer and a
> > > len, and write that to the ring buffer.
> > 
> > Yes, of course, but if we're going to modify the code then I thought we
> > should probably trace everything independent of the console printk
> > level.
> > 
> 
> This will trace everything independent from the console level. Noticed
> that I put the tracepoint before the msg_log_level is checked.

D'oh, right. Yeah that seems good. Too bad I discarded my previous
attempt already :)

johannes

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