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: <20130425144955.GC1033@krava.brq.redhat.com>
Date:	Thu, 25 Apr 2013 16:49:55 +0200
From:	Jiri Olsa <jolsa@...hat.com>
To:	Steven Rostedt <rostedt@...dmis.org>
Cc:	Namhyung Kim <namhyung@...nel.org>,
	Arnaldo Carvalho de Melo <acme@...stprotocols.net>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Paul Mackerras <paulus@...ba.org>,
	Ingo Molnar <mingo@...nel.org>,
	Namhyung Kim <namhyung.kim@....com>,
	LKML <linux-kernel@...r.kernel.org>,
	Frederic Weisbecker <fweisbec@...il.com>,
	David Ahern <dsahern@...il.com>,
	Stephane Eranian <eranian@...gle.com>
Subject: Re: [PATCH 05/14] perf tools: Introduce new 'ftrace' tool

On Thu, Apr 25, 2013 at 09:05:21AM -0400, Steven Rostedt wrote:
> On Thu, 2013-04-25 at 18:51 +0900, Namhyung Kim wrote:
> > >
> > >> 
> > >> Do you mean it should be changed to
> > >> 
> > >> 	if (write_tracing_file("set_ftrace_pid", "-1") < 0)
> > >> 
> > >> ?  It seems it's the right thing to do for compatibility.
> > >
> > >
> > > looks like it's enough only to open it with O_TRUNC,
> > > so I guess whatever minimal goes write_tracing_file
> 
> Correct.
> 
> > 
> > Yeah, but I can see below from trace-cmd code.
> > 
> > trace-cmd/trace-record.c:
> > 
> > 	/*
> > 	 * Older kernels required "-1" to disable pid
> > 	 */
> > 	if (ret < 0 && !strlen(pid))
> > 		ret = write(fd, "-1", 2);
> > 
> > 
> > Could you clarify this, Steve?
> 
> As the comment states, older kernels (before 2.6.33) required a -1. As
> trace-cmd is set up to work with at least 2.6.32, it requires the "-1"
> write. It doesn't hurt to have it.
> 
> But for perf ftrace (or whatever), I don't think we need the requirement
> to work with 2.6.32 kernels. Perf was added in 2.6.31, but do all
> functionalities still work that far back?

perf maintains backward compatibility, but not sure how far
back it goes.. but as long as it's just writing -1 in here
let's do that

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