lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3d63f8b2-c028-4cae-ad72-76378425c73a@linux.intel.com>
Date: Wed, 18 Dec 2024 11:55:53 -0500
From: "Liang, Kan" <kan.liang@...ux.intel.com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: mingo@...hat.com, acme@...nel.org, namhyung@...nel.org,
 irogers@...gle.com, linux-kernel@...r.kernel.org,
 linux-perf-users@...r.kernel.org, ak@...ux.intel.com, eranian@...gle.com,
 dapeng1.mi@...ux.intel.com
Subject: Re: [PATCH V6 3/3] perf/x86/intel: Support PEBS counters snapshotting



On 2024-12-18 11:32 a.m., Peter Zijlstra wrote:
> On Wed, Dec 18, 2024 at 07:16:43AM -0800, kan.liang@...ux.intel.com wrote:
> 
>> To prevent the case that a PEBS record value might be in the past
>> relative to what is already in the event, perf always stops the PMU and
>> drains the PEBS buffer before updating the corresponding event->count.
> 
> Like I wrote here:
> 
>   https://lkml.kernel.org/r/20241218082404.GI11133@noisy.programming.kicks-ass.net
> 
> I don't think this is sufficient.


I replied with an explanation this morning in the old V5 thread. I'm not
sure if you got a chance to look at it.
https://lore.kernel.org/all/5a4ab06e-8628-4e1d-addb-2af920deffad@linux.intel.com/

There will be a drain_pebs() right before handling A-overflow-PMI.

  B-assist			A=1
  C				A=2
  B-assist			A=3
  		<- drain_pebs()
  A-overflow-PMI		A=4
  C-assist-PMI (DS buffer)	A=5

So the A-overflow-PMI will
   - Process the DS. adjust A->count to 3
   - adjust A->count to 4

Is it sufficient?
If not, could you please share more details?

Thanks,
Kan



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ