Re: [RFC 4/5] x86, perf: implements lwp-perf-integration (rc1)

Gleb Natapov
2011-12-21T11:46:34Z

On Tue, Dec 20, 2011 at 07:40:04PM +0100, Ingo Molnar wrote:
> > The point is, if user-space re-programs LWP it will continue
> > to write its samples to the new ring-buffer virtual-address
> > set up by user-space. It will still use that virtual address
> > in another address-space after a task-switch. This allows
> > processes to corrupt memory of other processes. [...]
>
> That's nonsense. As i said it my previous mail the LWPC should
> be per task and switched on task switch - just like the DS/PEBS
> context is.
>
Is it? Looking at arch/x86/kernel/cpu/perf_event_intel_ds.c it seems
like DS is per cpu, not per task.

--
Gleb.