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.1503061332150.25334@vincent-weaver-1.umelst.maine.edu>
Date:	Fri, 6 Mar 2015 13:37:03 -0500 (EST)
From:	Vince Weaver <vincent.weaver@...ne.edu>
To:	Andi Kleen <andi@...stfloor.org>
cc:	Stephane Eranian <eranian@...gle.com>,
	Jiri Olsa <jolsa@...hat.com>,
	"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>
Subject: Re: [patch] perf_event_open.2: 3.19 PERF_SAMPLE_REGS_INTR support

On Mon, 2 Mar 2015, Andi Kleen wrote:

> > 	do not enable REGS_USER and REG_INTR at the same time
> > 		as REGS_USER will have REG_INTR values and
> > 		cannot be used for user stack unwinding
> 
> If that's true it would be a bug. But I doubt it.
> 
> The PEBS handler sets up its own pt_regs, so they should
> be independent.

I could be wrong here, but was tracing through the code.

If you trigger a PEBS interrupt (because you have precise_ip set)
and you have both REGS_USER and REGS_INTR set, then 
	__intel_pmu_pebs_event()
is called from 
	arch/x86/kernel/cpu/perf_event_intel_ds.c

and in there it sets the regs values based solely on

        if (sample_type & PERF_SAMPLE_REGS_INTR) {
	}

with those values copies into regs and then passed upstream through 
	perf_event_overflow()

so if the sample_type has *both* PERF_SAMPLE_REGS_INTR and
PERF_SAMPLE_REGS_USER set, then the PERF_SAMPLE_REGS_USER values
will have the same register values as the PERF_SAMPLE_REGS_INTR values.

Maybe this is the expected behavior, or maybe I am missing something 
still.

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