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>] [day] [month] [year] [list]
Message-ID: <tip-xyynkucl5p4bcs13zi4i4b1f@git.kernel.org>
Date:	Thu, 6 Aug 2015 00:00:41 -0700
From:	tip-bot for Arnaldo Carvalho de Melo <tipbot@...or.com>
To:	linux-tip-commits@...r.kernel.org
Cc:	adrian.hunter@...el.com, eranian@...gle.com, tglx@...utronix.de,
	fweisbec@...il.com, dsahern@...il.com, acme@...hat.com,
	linux-kernel@...r.kernel.org, bp@...e.de, namhyung@...nel.org,
	jolsa@...nel.org, mingo@...nel.org, hpa@...or.com
Subject: [tip:perf/core] perf script: No tracepoints? Don'
 t call libtraceevent.

Commit-ID:  9ee67421fe3b67a0796d6ea620fd5fcb037d3f89
Gitweb:     http://git.kernel.org/tip/9ee67421fe3b67a0796d6ea620fd5fcb037d3f89
Author:     Arnaldo Carvalho de Melo <acme@...hat.com>
AuthorDate: Mon, 3 Aug 2015 16:27:40 -0300
Committer:  Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Tue, 4 Aug 2015 12:28:10 -0300

perf script: No tracepoints? Don't call libtraceevent.

The libtraceevent handler (session->tevent) is only initialized when
there are tracepoints in a perf.data event list, so do not call
pevent_set_function_resolve() in those cases, fixing a segfault.

Reported-by: Jiri Olsa <jolsa@...nel.org>
Tested-by: Jiri Olsa <jolsa@...nel.org>
Cc: Adrian Hunter <adrian.hunter@...el.com>
Cc: Borislav Petkov <bp@...e.de>
Cc: David Ahern <dsahern@...il.com>
Cc: Frederic Weisbecker <fweisbec@...il.com>
Cc: Namhyung Kim <namhyung@...nel.org>
Cc: Stephane Eranian <eranian@...gle.com>
Link: http://lkml.kernel.org/n/tip-xyynkucl5p4bcs13zi4i4b1f@git.kernel.org
Report-link: http://lkml.kernel.org/r/20150803174113.GA20282@krava.redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
 tools/perf/builtin-script.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c
index bd31380..7912feb 100644
--- a/tools/perf/builtin-script.c
+++ b/tools/perf/builtin-script.c
@@ -1861,7 +1861,8 @@ int cmd_script(int argc, const char **argv, const char *prefix __maybe_unused)
 	else
 		symbol_conf.use_callchain = false;
 
-	if (pevent_set_function_resolver(session->tevent.pevent,
+	if (session->tevent.pevent &&
+	    pevent_set_function_resolver(session->tevent.pevent,
 					 machine__resolve_kernel_addr,
 					 &session->machines.host) < 0) {
 		pr_err("%s: failed to set libtraceevent function resolver\n", __func__);
--
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