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: <1309167248.6701.10.camel@twins>
Date:	Mon, 27 Jun 2011 11:34:08 +0200
From:	Peter Zijlstra <a.p.zijlstra@...llo.nl>
To:	Eric B Munson <emunson@...bm.net>
Cc:	mingo@...e.hu, borislav.petkov@....com, bblum@...rew.cmu.edu,
	linux-kernel@...r.kernel.org, mhack@...ibm.com, eranian@...gle.com
Subject: Re: [PATCH 3/3] events: Ensure that timers are updated without
 requiring read() call

On Fri, 2011-06-24 at 08:49 -0400, Eric B Munson wrote:

> Now that I think about it, this will just mask the problem.  I have a test
> program uses the mmap'd user space page to access event counters (it never
> calls read()).  In this case, the timer values in the event will never be
> updated.  It will display "properly" but the structure won't ever be correct.
> Given that, how can we keep the event values current?

Well the idea is that you do a userspace read of the counter, on x86
that would be using rdpmc and use the provided event count as base. See
the comment in struct perf_event_mmap_page.

Currently we don't have rdpmc support for x86, but it shouldn't be hard.
We should poke at CR4 in our CPU_STARTING callback, and fix up the mess
called perf_event_index() to deal with the strange and wonderful
encoding rdpmc needs (might want an event->pmu->index callback or so).

Currently all this only works on PowerPC.
--
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