lkml.org 
[lkml]   [2014]   [Jul]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 6/9] perf, x86: handle multiple records in PEBS buffer
On Tue, Jul 22, 2014 at 04:09:59PM +0800, Yan, Zheng wrote:
> One corner case needs to mention is that the PEBS hardware doesn't
> deal well with collisions, when PEBS events happen near to each
> other. The records for the events can be collapsed into a single
> one. However in practice collisions are extremely rare, as long as
> different events are used. The periods are typically very large,
> so any collision is unlikely. When collision happens, we can either
> drop the PEBS record or use the record to serve multiple events.
> This patch chooses the later approach.

You can't.. the events might have different security context.

Remember, the overflow bit is set from the overflow until the PEBS
event is generated, this is quite a long time. So if another PEBS event
gets generated while the other is still pending it will have both bits
set. Even though the second bit is for another (unrelated) counter.

The unrelated counter might not have privilege to observe the data of
the generated event.

I think you can unwind and fully correct this trainwreck. But simply
delivering an even with multiple bits set to all relevant events is
wrong and might leak sensitive information.


\
 
 \ /
  Last update: 2014-07-25 11:01    [W:0.145 / U:0.188 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site