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: <1341186904-66077-1-git-send-email-dsahern@gmail.com>
Date:	Sun,  1 Jul 2012 17:55:04 -0600
From:	David Ahern <dsahern@...il.com>
To:	linux-kernel@...r.kernel.org
Cc:	David Ahern <dsahern@...il.com>,
	Arnaldo Carvalho de Melo <acme@...hat.com>,
	Ingo Molnar <mingo@...nel.org>, Jiri Olsa <jolsa@...hat.com>,
	Namhyung Kim <namhyung@...il.com>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Peter Zijlstra <peterz@...radead.org>
Subject: [PATCH] perf: Don't assume host's module path for default guest machine

When using the default guest modules option (--guestmodules) for perf-kvm
the host's module path is prepended to the modules. e.g,

... PERF_RECORD_MMAP 0/0: [0xffffffffa0005000(0x4fff) @ 0]:
    /lib/modules/3.4.0+/kernel/drivers/virtio/virtio.ko

which is wrong so don't do it. With this patch MMAP events for default guest
kernel modules become:

... PERF_RECORD_MMAP 0/0: [0xffffffffa0005000(0x4fff) @ 0]: [virtio]

Signed-off-by: David Ahern <dsahern@...il.com>
Cc: Arnaldo Carvalho de Melo <acme@...hat.com>
Cc: Ingo Molnar <mingo@...nel.org>
Cc: Jiri Olsa <jolsa@...hat.com>
Cc: Namhyung Kim <namhyung@...il.com>
Cc: Frederic Weisbecker <fweisbec@...il.com>
Cc: Peter Zijlstra <peterz@...radead.org>
---
 tools/perf/util/symbol.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
index 50958bb..90f6951 100644
--- a/tools/perf/util/symbol.c
+++ b/tools/perf/util/symbol.c
@@ -2077,6 +2077,9 @@ static int machine__create_modules(struct machine *machine)
 	free(line);
 	fclose(file);
 
+	if (machine->pid == DEFAULT_GUEST_KERNEL_ID)
+		return 0;
+
 	return machine__set_modules_path(machine);
 
 out_delete_line:
-- 
1.7.10.1

--
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