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: <20160105215002.GC25916@kernel.org>
Date:	Tue, 5 Jan 2016 18:50:02 -0300
From:	Arnaldo Carvalho de Melo <acme@...nel.org>
To:	Namhyung Kim <namhyung@...nel.org>
Cc:	Ingo Molnar <mingo@...nel.org>,
	Peter Zijlstra <peterz@...radead.org>,
	Jiri Olsa <jolsa@...nel.org>,
	LKML <linux-kernel@...r.kernel.org>,
	David Ahern <dsahern@...il.com>,
	Steven Rostedt <rostedt@...dmis.org>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Andi Kleen <andi@...stfloor.org>,
	Wang Nan <wangnan0@...wei.com>
Subject: Re: [PATCH v2 1/5] perf tools: Fix segfault when using -s
 trace_fields

Em Tue, Jan 05, 2016 at 07:58:34PM +0900, Namhyung Kim escreveu:
> When the 'trace_fields' sort key is used explicitly for non-tracepoint
> events, it'll get segfault since it assumed evsel->tp_format was set.
> Skip those events in add_all_dynamic_fields().
> 
> Acked-by: Jiri Olsa <jolsa@...nel.org>
> Signed-off-by: Namhyung Kim <namhyung@...nel.org>

Merged with the patch introducing this problem, that I hadn't sent to
Ingo,

- Arnaldo

> ---
>  tools/perf/util/sort.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/tools/perf/util/sort.c b/tools/perf/util/sort.c
> index e558e87cafaf..59c4c8586d79 100644
> --- a/tools/perf/util/sort.c
> +++ b/tools/perf/util/sort.c
> @@ -1955,6 +1955,9 @@ static int add_all_dynamic_fields(struct perf_evlist *evlist, bool raw_trace)
>  	struct perf_evsel *evsel;
>  
>  	evlist__for_each(evlist, evsel) {
> +		if (evsel->attr.type != PERF_TYPE_TRACEPOINT)
> +			continue;
> +
>  		ret = add_evsel_fields(evsel, raw_trace);
>  		if (ret < 0)
>  			return ret;
> -- 
> 2.6.4
--
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