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:	Mon, 12 Jan 2015 20:44:23 +0900
From:	Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>
To:	Namhyung Kim <namhyung@...nel.org>
Cc:	Arnaldo Carvalho de Melo <acme@...nel.org>,
	Ingo Molnar <mingo@...nel.org>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Jiri Olsa <jolsa@...hat.com>,
	LKML <linux-kernel@...r.kernel.org>,
	David Ahern <dsahern@...il.com>
Subject: Re: [PATCH 1/4] perf tools: Allow use of an exclusive option more
 than once

(2015/01/10 19:33), Namhyung Kim wrote:
> The exclusive options are to prohibit use of conflicting options at the
> same time.  But it had a side effect that it also limits a such option
> can be used at most once.  Currently the only user of the flag is perf
> probe and it allows to use such options more than once, but when one
> tries to use it, perf will fail like below:
> 
>   $ sudo perf probe -x /lib/libc-2.20.so --add malloc --add free
>     Error: option `add' cannot be used with add
>   ...
> 
> Cc: Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>

Reviewed-by: Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>

Thanks!

> Signed-off-by: Namhyung Kim <namhyung@...nel.org>
> ---
>  tools/perf/util/parse-options.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/perf/util/parse-options.c b/tools/perf/util/parse-options.c
> index f62dee7bd924..4a015f77e2b5 100644
> --- a/tools/perf/util/parse-options.c
> +++ b/tools/perf/util/parse-options.c
> @@ -46,7 +46,7 @@ static int get_value(struct parse_opt_ctx_t *p,
>  		return opterror(opt, "is not usable", flags);
>  
>  	if (opt->flags & PARSE_OPT_EXCLUSIVE) {
> -		if (p->excl_opt) {
> +		if (p->excl_opt && p->excl_opt != opt) {
>  			char msg[128];
>  
>  			if (((flags & OPT_SHORT) && p->excl_opt->short_name) ||
> 


-- 
Masami HIRAMATSU
Software Platform Research Dept. Linux Technology Research Center
Hitachi, Ltd., Yokohama Research Laboratory
E-mail: masami.hiramatsu.pt@...achi.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