lkml.org 
[lkml]   [2008]   [Nov]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch 20/24] perfmon: system calls interface
stephane eranian writes:

> Perfmon requires ptrace ONLY to stop the thread you want to operate
> on. For instance, to read the counters in a thread via pfm_read(), you
> need to have that thread stopped, so perfmon can extract the machine
> state safely.

What would happen if the thread wasn't stopped? Is it just that the
numbers would be inaccurate, or is there some kind of security
exposure?

If it's just that the numbers would be inaccurate, then I don't think
the kernel needs to enforce it. The monitoring program *should*
ensure that the thread is stopped or blocked, one way or another, but
it could do that simply by sending a SIGSTOP to the thread. I don't
see that it would necessarily have to use ptrace.

Paul.


\
 
 \ /
  Last update: 2008-12-01 01:53    [W:0.116 / U:0.608 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site