Re: [PATCH V2 3/3] perf/x86: Reset the dirty counter to prevent the leak for an RDPMC task

2020-09-09 Thread Liang, Kan
On 9/8/2020 11:58 AM, pet...@infradead.org wrote: > On Mon, Sep 07, 2020 at 06:01:15PM +0200, pet...@infradead.org wrote: >> On Fri, Aug 21, 2020 at 12:57:54PM -0700, kan.li...@linux.intel.com >>> diff --git a/arch/x86/events/core.c b/arch/x86/events/core.c >>> index 0f3d01562ded..fa08d810dcd2

Re: [PATCH V2 3/3] perf/x86: Reset the dirty counter to prevent the leak for an RDPMC task

2020-09-08 Thread peterz
On Mon, Sep 07, 2020 at 06:01:15PM +0200, pet...@infradead.org wrote: > On Fri, Aug 21, 2020 at 12:57:54PM -0700, kan.li...@linux.intel.com wrote: > > diff --git a/arch/x86/events/core.c b/arch/x86/events/core.c > > index 0f3d01562ded..fa08d810dcd2 100644 > > --- a/arch/x86/events/core.c > > +++

Re: [PATCH V2 3/3] perf/x86: Reset the dirty counter to prevent the leak for an RDPMC task

2020-09-07 Thread peterz
On Fri, Aug 21, 2020 at 12:57:54PM -0700, kan.li...@linux.intel.com wrote: > diff --git a/arch/x86/events/core.c b/arch/x86/events/core.c > index 0f3d01562ded..fa08d810dcd2 100644 > --- a/arch/x86/events/core.c > +++ b/arch/x86/events/core.c > @@ -1440,7 +1440,10 @@ static void

[PATCH V2 3/3] perf/x86: Reset the dirty counter to prevent the leak for an RDPMC task

2020-08-21 Thread kan . liang
From: Kan Liang The counter value of a perf task may leak to another RDPMC task. For example, a perf stat task as below is running on CPU 0. perf stat -e 'branches,cycles' -- taskset -c 0 ./workload In the meantime, an RDPMC task, which is also running on CPU 0, may read the GP counters