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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20171128002321.2878-2-andi@firstfloor.org>
Date:   Mon, 27 Nov 2017 16:23:10 -0800
From:   Andi Kleen <andi@...stfloor.org>
To:     acme@...nel.org
Cc:     jolsa@...nel.org, mhiramat@...nel.org, adrian.hunter@...el.com,
        linux-kernel@...r.kernel.org, Andi Kleen <ak@...ux.intel.com>
Subject: [PATCH 01/12] perf, tools, pt: Clear instruction for ptwrite samples

From: Andi Kleen <ak@...ux.intel.com>

When a PTWRITE sample is synthesized the PT decoder already
ran ahead and sample->insn contains the next branch instruction,
not the PTWRITE.

Clear it for PTWRITE samples to avoid confusion.

Signed-off-by: Andi Kleen <ak@...ux.intel.com>
---
 tools/perf/util/intel-pt.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/tools/perf/util/intel-pt.c b/tools/perf/util/intel-pt.c
index 23f9ba676df0..485c8040484e 100644
--- a/tools/perf/util/intel-pt.c
+++ b/tools/perf/util/intel-pt.c
@@ -1262,6 +1262,12 @@ static void intel_pt_prep_p_sample(struct intel_pt *pt,
 	 */
 	if (!sample->ip)
 		sample->flags = 0;
+
+	/*
+	 * Don't have valid instructions because decoder already ran ahead.
+	 */
+	sample->insn_len = 0;
+	memset(sample->insn, 0, INTEL_PT_INSN_BUF_SZ);
 }
 
 static int intel_pt_synth_ptwrite_sample(struct intel_pt_queue *ptq)
-- 
2.13.6

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ