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: <alpine.DEB.2.11.1503021425220.17687@vincent-weaver-1.umelst.maine.edu>
Date:	Mon, 2 Mar 2015 14:31:40 -0500 (EST)
From:	Vince Weaver <vincent.weaver@...ne.edu>
To:	Stephane Eranian <eranian@...gle.com>
cc:	Jiri Olsa <jolsa@...hat.com>,
	Vince Weaver <vincent.weaver@...ne.edu>,
	"Michael Kerrisk (man-pages)" <mtk.manpages@...il.com>,
	linux-man@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Paul Mackerras <paulus@...ba.org>,
	Ingo Molnar <mingo@...hat.com>,
	Arnaldo Carvalho de Melo <acme@...nel.org>,
	Chuck Ebbert <cebbert.lkml@...il.com>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Andi Kleen <andi@...stfloor.org>
Subject: Re: [patch] perf_event_open.2: 3.19 PERF_SAMPLE_REGS_INTR support

On Sun, 1 Mar 2015, Stephane Eranian wrote:

> You need to describe your test better. Are you saying that the register values
> you were seeing with REGS_USER, REGS_INTR, precise_ip > 0 are all
> the same? That is certainly not impossible. If your PMU interrupts are all
> at the user level, then REGS_INTR = REGS_USER. With precise_ip > 0,
> you will get the machine state on retirement of the sampled instruction.
> But if you have no sampling skid without precise_ip, then both states
> the REGS_INTR and REGS_INTR+precise_ip>0 could be identical.

If you enable both PERF_SAMPLE_REGS_USER and PERF_SAMPLE_REGS_INTR
then you will get in the PERF_RECORD_SAMPLE results for both user
and intr. However they will be identical, always, because
the kernel code just checks if PERF_SAMPLE_REGS_INTR was given and
then returns the PEBS state for both.

My test was expecting that if you specified PERF_SAMPLE_REGS_USER and
PERF_SAMPLE_REGS_INTR then for the PERF_SAMPLE_REGS_USER values you'd
get the same results as when PERF_SAMPLE_REGS_INTR were not specified, but 
that's not the case.

This is an obscure corner case, but I found the results unexpected.

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