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]
Date:	Fri, 18 Nov 2011 19:46:15 +0100
From:	Johannes Berg <johannes@...solutions.net>
To:	Frederic Weisbecker <fweisbec@...il.com>
Cc:	Steven Rostedt <rostedt@...dmis.org>,
	Christoph Hellwig <hch@...radead.org>,
	LKML <linux-kernel@...r.kernel.org>,
	Ingo Molnar <mingo@...hat.com>
Subject: Re: [PATCH v2] printk: add console output tracing

On Fri, 2011-11-18 at 19:44 +0100, Frederic Weisbecker wrote:

> > +TRACE_EVENT_CONDITION(console,
> > +	TP_PROTO(const char *log_buf, unsigned start, unsigned end,
> > +		 unsigned log_buf_len),
> > +
> > +	TP_ARGS(log_buf, start, end, log_buf_len),
> > +
> > +	TP_CONDITION(start != end),
> > +
> > +	TP_STRUCT__entry(
> > +		__dynamic_array(char, msg,
> > +				((end - start + log_buf_len) &
> > +				 (log_buf_len - 1)) + 1)
> 
> Is all that care about log_buf_len necessary? It seems that
> printk ensures that log_end - con_start never exceeds log_buf_len,
> looking at emit_log_char()

I think it is. The buffer can wrap around so in that case end < start,
which just end-start won't handle here.

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