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  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Thu, 20 Mar 2014 16:32:12 -0300
From:	Arnaldo Carvalho de Melo <acme@...nel.org>
To:	Adrien BAK <adrien.bak@...ascale.org>
Cc:	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Paul Mackerras <paulus@...ba.org>,
	Ingo Molnar <mingo@...hat.com>, linux-kernel@...r.kernel.org,
	Mathias Gaunard <mathias.gaunard@...ascale.org>
Subject: Re: [PATCH] perf-script : improves option passing mechansim

Em Thu, Mar 20, 2014 at 02:52:30PM +0100, Adrien BAK escreveu:
> Indeed. I wasn't aware of the '--' behaviour and the documentation
> doesn't seem to mention it. My patch essentially implements the same
> behaviour, except that the script name itself is used to separate
> the options. I guess there is not much need the proposed patch then.
> 
> Sorry for the wasted time.

No need to be sorry, I appreciate _you_ taking the time to help improve
the tools, maybe you can send a patch to update the documentation
instead, with examples where -- is used so that people don't fall into
this trap again?

Thanks!

- Arnaldo

> Adrien
> 
> On 03/18/2014 07:15 PM, Arnaldo Carvalho de Melo wrote:
> >Em Tue, Mar 18, 2014 at 05:09:33PM +0100, Adrien BAK escreveu:
> >>This pull request fixes the following issues :
> >>* when passing custom arguments to a script, if those arguments are
> >>  not declared within perf, they prevent the execution of perf.
> >>e.g.
> >>
> >>perf script -i path/to/perf.data -s my_script -arg1 arg_value
> >>
> >>perf will issue an error message and no processing will occur
> >I haven't tested this, but what comes to mind is the use of -- to
> >separate what options should be processed by perf and which ones should
> >be left to the script, is that what you're fixing?
> >
> >- Arnaldo
> >>* when passing custom arguments to a script, if those arguments are
> >>  declared by perf, they are consumed and not passed to the script.
> >>e.g.
> >>perf script -i path/to/perf.data -s my_script -h
> >>
> >>perf will display its own help message, instead of the expected help
> >>message from my_script.
> >>
> >>These issues are addressed as follows :
> >>* The parse option flag is changed from PARSE_OPT_STOP_AT_NON_OPTION to
> >>PARSE_OPT_KEEP_UNKNOWN
> >>* A new option type is introduce OPT_CALLBACK_FINAL_OPTION, which
> >>effectively
> >>  prevents the parsing of all options located after the script.
> >>
> >>Signed-off-by: Adrien Bak <adrien.bak@...ascale.org>
--
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