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:	Thu, 27 Aug 2009 17:38:56 -0700
From:	Josh Stone <jistone@...hat.com>
To:	Frederic Weisbecker <fweisbec@...il.com>
CC:	Ingo Molnar <mingo@...e.hu>, LKML <linux-kernel@...r.kernel.org>,
	Li Zefan <lizf@...fujitsu.com>,
	Steven Rostedt <srostedt@...hat.com>,
	Jason Baron <jbaron@...hat.com>
Subject: Re: [PATCH] tracing: Fix double CPP substitution in TRACE_EVENT_FN

On 08/27/2009 03:50 PM, Frederic Weisbecker wrote:
> TRACE_EVENT_FN relays on TRACE_EVENT by reprocessing its parameters
> into the ftrace events CPP macro. This leads to a double substitution
> in some cases.
> 
> For example, a bad consequence is a format always prefixed by
> "%s, %s\n" for every TRACE_EVENT_FN based events.
> 
> Eg:
> 	cat /debug/tracing/events/syscalls/sys_enter/format
> 	[...]
> 	print fmt: "%s, %s\n", "\"NR %ld (%lx, %lx, %lx, %lx, %lx, %lx)\"",\
> 	"REC->id, REC->args[0], REC->args[1], REC->args[2], REC->args[3],\
> 	REC->args[4], REC->args[5]"
> 
> This creates a failure in post-processing tools such as perf trace or
> trace-cmd.

Fun - I didn't think about TP_printk and friends doing anything beside
passing their contents along.

> 
> Then drop this double substitution and replace it by a new __cpparg()
> macro that relays CPP arguments containing commas.

Looks good to me.

> 
> Signed-off-by: Frederic Weisbecker <fweisbec@...il.com>
> Cc: Josh Stone <jistone@...hat.com>
> Cc: Li Zefan <lizf@...fujitsu.com>
> Cc: Steven Rostedt <srostedt@...hat.com>
> Cc: Jason Baron <jbaron@...hat.com>

Reviewed-by: Josh Stone <jistone@...hat.com>
--
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