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: <20160212155058.GA14891@krava.redhat.com>
Date:	Fri, 12 Feb 2016 16:50:58 +0100
From:	Jiri Olsa <jolsa@...hat.com>
To:	Arnaldo Carvalho de Melo <acme@...hat.com>
Cc:	Wang Nan <wangnan0@...wei.com>,
	Alexei Starovoitov <ast@...nel.org>,
	Arnaldo Carvalho de Melo <acme@...nel.org>,
	Brendan Gregg <brendan.d.gregg@...il.com>,
	Adrian Hunter <adrian.hunter@...el.com>,
	Cody P Schafer <dev@...yps.com>,
	"David S. Miller" <davem@...emloft.net>,
	He Kuang <hekuang@...wei.com>,
	Jérémie Galarneau 
	<jeremie.galarneau@...icios.com>, Jiri Olsa <jolsa@...nel.org>,
	Kirill Smelkov <kirr@...edi.com>,
	Li Zefan <lizefan@...wei.com>,
	Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>,
	Namhyung Kim <namhyung@...nel.org>,
	Peter Zijlstra <peterz@...radead.org>, pi3orama@....com,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 10/54] perf stat: Forbid user passing improper config
 terms

On Fri, Feb 12, 2016 at 01:45:17PM -0200, Arnaldo Carvalho de Melo wrote:
> Em Fri, Feb 12, 2016 at 02:49:08PM +0100, Jiri Olsa escreveu:
> > On Fri, Feb 05, 2016 at 02:01:35PM +0000, Wang Nan wrote:
> > > 'perf stat' accepts some config terms but doesn't apply them. For
> > > example:
> > > 
> > >  # perf stat -e 'instructions/no-inherit/' -e 'instructions/inherit/' bash
> > >  # ls
> > >  # exit
> > > 
> > >  Performance counter stats for 'bash':
> > > 
> > >          266258061      instructions/no-inherit/
> > >          266258061      instructions/inherit/
> > 
> > hum, but we support no-/inherit in stat, it'd be better to
> > implement this one for stat IMO
> > 
> > 
> > > 
> > >        1.402183915 seconds time elapsed
> > > 
> > > The result is confusing, because user may expect the first
> > > 'instructions' event exclude the 'ls' command.
> > > 
> > > This patch forbit most of those config terms for 'perf stat'.
> > > 
> > > Result:
> > > 
> > >  # ./perf stat -e 'instructions/no-inherit/' -e 'instructions/inherit/' bash
> > >  event syntax error: 'instructions/no-inherit/'
> > >                       \___ Don't use record mode only config terms
> > 
> > and there's bunch of others which are sampling related:
> >   PARSE_EVENTS__TERM_TYPE_SAMPLE_*
> >   PERF_EVSEL__CONFIG_TERM_CALLGRAPH
> >   PERF_EVSEL__CONFIG_TERM_STACK_USER
> >   ...
> > 
> > probably all from get_config_terms apart from the 'inherot' ones,
> > which should end up with the error message, which could be more
> > user friendly like:
> > 
> >   - Can't use stack-size term in stat event.
> 
> 'stat' event? If this is the term you want to use maybe:
> 
>     'stack-size' is not usable in 'perf stat'.

ok I vote for this one then ^^^ ;-)

jirka

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ