lkml.org 
[lkml]   [2012]   [Jul]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [tip:perf/core] perf/x86: Fix USER/KERNEL tagging of samples
On Thu, Jul 5, 2012 at 11:20 PM, tip-bot for Peter Zijlstra
<a.p.zijlstra@chello.nl> wrote:
>
> Several perf interrupt handlers (PEBS,IBS,BTS) re-write regs->ip but
> do not update the segment registers. So use an regs->ip based test
> instead of an regs->cs/regs->flags based test.

Christ, people, YOU CANNOT DO THIS!

It is never *ever* valid to test the IP to see if you're in kernel
space or user space. People can do various odd segments etc, the IP is
totally meaningless.

If the perf handlers fake the IP information, they had better fake the
CS/eflags information too. Because it is *wrong* to look at IP. Don't
do it.

Linus


\
 
 \ /
  Last update: 2012-07-06 19:21    [W:0.064 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site