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: <20131120132749.GE1415@krava.brq.redhat.com>
Date:	Wed, 20 Nov 2013 14:27:49 +0100
From:	Jiri Olsa <jolsa@...hat.com>
To:	Steven Rostedt <rostedt@...dmis.org>
Cc:	LKML <linux-kernel@...r.kernel.org>,
	Arnaldo Carvalho de Melo <acme@...stprotocols.net>,
	Ingo Molnar <mingo@...nel.org>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Namhyung Kim <namhyung@...nel.org>
Subject: Re: [PATCH] tools lib traceevent: Use helper trace-seq in print
 functions like kernel does

On Tue, Nov 19, 2013 at 06:29:37PM -0500, Steven Rostedt wrote:
> Jiri Olso reported that his plugin for scsi was chopping off part of

s/Olso/Olsa/ 

;-)

> the output. Investigating this, I found that Jiri used the same
> functions as what is in the kernel, which adds the following:
> 
> 	trace_seq_putc(p, 0);
> 
> This adds a '\0' to the output string. The reason this works in the
> kernel is that the "p" that is passed to the function helper is a
> temporary trace_seq. But in the libtraceevent library, it's the pointer
> to the trace_seq used to output. By adding the '\0', it truncates the
> line and nothing added after that will be printed.
> 
> We can solve this in two ways. One is to have the helper functions for
> the library not add the unnecessary '\0'. The other is to change the
> library to also use a helper trace_seq structure that gets copied to
> the main trace_seq just like the kernel does.
> 
> The latter allows the helper functions in the plugins to be the same as
> the kernel, which is the better solution.
> 
> Reported-by: Jiri Olsa <jolsa@...hat.com>

Tested-by: Jiri Olsa <jolsa@...hat.com>

thanks,
jirka
--
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