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: <tip-b72e74d1f140eb32865540f9e26e9fe0fcf983b9@git.kernel.org>
Date:	Tue, 5 May 2015 20:11:50 -0700
From:	tip-bot for Adrian Hunter <tipbot@...or.com>
To:	linux-tip-commits@...r.kernel.org
Cc:	dsahern@...il.com, linux-kernel@...r.kernel.org, jolsa@...hat.com,
	acme@...hat.com, hpa@...or.com, namhyung@...il.com,
	adrian.hunter@...el.com, fweisbec@...il.com, tglx@...utronix.de,
	peterz@...radead.org, eranian@...gle.com, mingo@...nel.org
Subject: [tip:perf/core] perf evlist:
  Amend mmap ref counting for the AUX area mmap

Commit-ID:  b72e74d1f140eb32865540f9e26e9fe0fcf983b9
Gitweb:     http://git.kernel.org/tip/b72e74d1f140eb32865540f9e26e9fe0fcf983b9
Author:     Adrian Hunter <adrian.hunter@...el.com>
AuthorDate: Fri, 24 Apr 2015 22:29:43 +0300
Committer:  Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Mon, 4 May 2015 12:43:48 -0300

perf evlist: Amend mmap ref counting for the AUX area mmap

Reference counting of the mmap buffer does not work correctly when there
is an AUX area mmap also.

In snapshot mode it is not easy to know if the AUX area mmap buffer
contains usefull information. Equally the evlist does not know if the
recording is in sanpshot mode anyway.

Consequently, for now just assume the AUX area mmap always has data,
which will just cause the mmap buffer to remain mmapped for the duration
of the recording.

Signed-off-by: Adrian Hunter <adrian.hunter@...el.com>
Cc: David Ahern <dsahern@...il.com>
Cc: Frederic Weisbecker <fweisbec@...il.com>
Cc: Jiri Olsa <jolsa@...hat.com>
Cc: Namhyung Kim <namhyung@...il.com>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Stephane Eranian <eranian@...gle.com>
Link: http://lkml.kernel.org/r/1429903807-20559-2-git-send-email-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
 tools/perf/util/evlist.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c
index 0ec8c3b..7ec1bf9 100644
--- a/tools/perf/util/evlist.c
+++ b/tools/perf/util/evlist.c
@@ -695,7 +695,7 @@ union perf_event *perf_evlist__mmap_read(struct perf_evlist *evlist, int idx)
 
 static bool perf_mmap__empty(struct perf_mmap *md)
 {
-	return perf_mmap__read_head(md) == md->prev;
+	return perf_mmap__read_head(md) == md->prev && !md->auxtrace_mmap.base;
 }
 
 static void perf_evlist__mmap_get(struct perf_evlist *evlist, int idx)
--
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