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]
Date:	Tue, 10 Dec 2013 01:21:57 -0800
From:	tip-bot for Jiri Olsa <tipbot@...or.com>
To:	linux-tip-commits@...r.kernel.org
Cc:	acme@...hat.com, linux-kernel@...r.kernel.org, paulus@...ba.org,
	hpa@...or.com, mingo@...nel.org, a.p.zijlstra@...llo.nl,
	namhyung@...nel.org, jolsa@...hat.com, fweisbec@...il.com,
	rostedt@...dmis.org, dsahern@...il.com, tglx@...utronix.de,
	cjashfor@...ux.vnet.ibm.com, mingo@...e.hu
Subject: [tip:perf/core] tools lib traceevent:
  Update kvm plugin with is_writable_pte helper

Commit-ID:  6d65894bc028d0342829ea1e64c9e9efad571124
Gitweb:     http://git.kernel.org/tip/6d65894bc028d0342829ea1e64c9e9efad571124
Author:     Jiri Olsa <jolsa@...hat.com>
AuthorDate: Tue, 3 Dec 2013 14:09:41 +0100
Committer:  Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Wed, 4 Dec 2013 15:38:14 -0300

tools lib traceevent: Update kvm plugin with is_writable_pte helper

Adding is_writable_pte print helper function, so the
kvmmmu:fast_page_fault print format gets resolved properly.

The diff of 'perf script' output generated by old and new code:
(data was generated by 'perf record -e 'kvm:*,kvmmmu:*' -a')

  --- script.kvm.old
  +++ script.kvm.new
  - qemu-system-x86  3290 [002] 10708.755312: kvmmmu:fast_page_fault: [FAILED TO PARSE] vcpu_id=0 gva=4094486080 error_code=3 sptep=0xffff88019f1e3670 old_spte=336391285 new_spte=336391287 retry=1
  + qemu-system-x86  3290 [002] 10708.755312: kvmmmu:fast_page_fault: vcpu 0 gva f40ce640 error_code P|W sptep 0xffff88019f1e3670 old 0x140cec75 new 140cec77 spurious 0 fixed 1

Signed-off-by: Jiri Olsa <jolsa@...hat.com>
Cc: Corey Ashford <cjashfor@...ux.vnet.ibm.com>
Cc: David Ahern <dsahern@...il.com>
Cc: Frederic Weisbecker <fweisbec@...il.com>
Cc: Ingo Molnar <mingo@...e.hu>
Cc: Namhyung Kim <namhyung@...nel.org>
Cc: Paul Mackerras <paulus@...ba.org>
Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc: Steven Rostedt <rostedt@...dmis.org>
Link: http://lkml.kernel.org/r/1386076182-14484-28-git-send-email-jolsa@redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
 tools/lib/traceevent/plugin_kvm.c | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/tools/lib/traceevent/plugin_kvm.c b/tools/lib/traceevent/plugin_kvm.c
index be9d9c6..a0e282c 100644
--- a/tools/lib/traceevent/plugin_kvm.c
+++ b/tools/lib/traceevent/plugin_kvm.c
@@ -389,6 +389,16 @@ static int kvm_mmu_get_page_handler(struct trace_seq *s,
 	return kvm_mmu_print_role(s, record, event, context);
 }
 
+#define PT_WRITABLE_SHIFT 1
+#define PT_WRITABLE_MASK (1ULL << PT_WRITABLE_SHIFT)
+
+static unsigned long long
+process_is_writable_pte(struct trace_seq *s, unsigned long long *args)
+{
+	unsigned long pte = args[0];
+	return pte & PT_WRITABLE_MASK;
+}
+
 int PEVENT_PLUGIN_LOADER(struct pevent *pevent)
 {
 	init_disassembler();
@@ -415,5 +425,12 @@ int PEVENT_PLUGIN_LOADER(struct pevent *pevent)
 	pevent_register_event_handler(pevent, -1, "kvmmmu",
 			"kvm_mmu_prepare_zap_page", kvm_mmu_print_role,
 			NULL);
+
+	pevent_register_print_function(pevent,
+				       process_is_writable_pte,
+				       PEVENT_FUNC_ARG_INT,
+				       "is_writable_pte",
+				       PEVENT_FUNC_ARG_LONG,
+				       PEVENT_FUNC_ARG_VOID);
 	return 0;
 }
--
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