Re: [PATCH] perf/x86: Reset the counter to prevent the leak for a RDPMC task

From: peterz
Date: Thu Jul 30 2020 - 12:51:15 EST


On Thu, Jul 30, 2020 at 06:44:26PM +0200, peterz@xxxxxxxxxxxxx wrote:
> Arguably we should have perf_mmap_open() check if 'event->hw.target ==
> current', because without that RDPMC is still pointless.

event->hw.target->mm == current->mm, I suppose, otherwise accounting
goes wobbly real fast.