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-73547aacdcd45cdf8b53245ded9593d7c587501a@git.kernel.org>
Date:	Sun, 12 Jan 2014 10:37:13 -0800
From:	tip-bot for Dongsheng Yang <tipbot@...or.com>
To:	linux-tip-commits@...r.kernel.org
Cc:	acme@...hat.com, linux-kernel@...r.kernel.org, hpa@...or.com,
	mingo@...nel.org, namhyung.kim@....com, jolsa@...hat.com,
	dsahern@...il.com, tglx@...utronix.de, yangds.fnst@...fujitsu.com
Subject: [tip:perf/core] perf tools: Set event->
 header.misc to PERF_RECORD_MISC_GUEST_USER if machine is guest.

Commit-ID:  73547aacdcd45cdf8b53245ded9593d7c587501a
Gitweb:     http://git.kernel.org/tip/73547aacdcd45cdf8b53245ded9593d7c587501a
Author:     Dongsheng Yang <yangds.fnst@...fujitsu.com>
AuthorDate: Fri, 20 Dec 2013 15:52:58 -0500
Committer:  Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Mon, 23 Dec 2013 16:49:50 -0300

perf tools: Set event->header.misc to PERF_RECORD_MISC_GUEST_USER if machine is guest.

When we synthesize the mmap events of user space, if machine is guest,
we should set the event->header.misc to PERF_RECORD_MISC_GUEST_USER,
rather than PERF_RECORD_MISC_USER.

Signed-off-by: Dongsheng Yang <yangds.fnst@...fujitsu.com>
Cc: David Ahern <dsahern@...il.com>
Cc: Ingo Molnar <mingo@...nel.org>
Cc: Jiri Olsa <jolsa@...hat.com>
Cc: Namhyung Kim <namhyung.kim@....com>
Link: http://lkml.kernel.org/r/e6f8ff6505d2db8a4b21bff8e448bb9be0bcff35.1387572416.git.yangds.fnst@cn.fujitsu.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
 tools/perf/util/event.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tools/perf/util/event.c b/tools/perf/util/event.c
index a61726e..07c0783 100644
--- a/tools/perf/util/event.c
+++ b/tools/perf/util/event.c
@@ -220,7 +220,10 @@ static int perf_event__synthesize_mmap_events(struct perf_tool *tool,
 		/*
 		 * Just like the kernel, see __perf_event_mmap in kernel/perf_event.c
 		 */
-		event->header.misc = PERF_RECORD_MISC_USER;
+		if (machine__is_host(machine))
+			event->header.misc = PERF_RECORD_MISC_USER;
+		else
+			event->header.misc = PERF_RECORD_MISC_GUEST_USER;
 
 		if (prot[2] != 'x') {
 			if (!mmap_data || prot[0] != 'r')
--
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