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] [day] [month] [year] [list]
Message-ID: <82853f34-cd5a-43d7-81de-8e40144503e1@amd.com>
Date: Wed, 21 May 2025 11:00:54 +0530
From: Sandipan Das <sandipan.das@....com>
To: Ingo Molnar <mingo@...nel.org>, Vince Weaver <vincent.weaver@...ne.edu>
Cc: linux-kernel@...r.kernel.org, linux-tip-commits@...r.kernel.org,
 Peter Zijlstra <peterz@...radead.org>, linux-perf-users@...r.kernel.org,
 x86@...nel.org
Subject: Re: [tip: perf/urgent] perf/x86/amd/core: Fix Family 17h+ instruction
 cache events

On 5/17/2025 6:32 PM, Ingo Molnar wrote:
> 
> * Vince Weaver <vincent.weaver@...ne.edu> wrote:
> 
>> On Fri, 16 May 2025, tip-bot2 for Sandipan Das wrote:
>>
>>> The following commit has been merged into the perf/urgent branch of tip:
>>>
>>
>>> perf/x86/amd/core: Fix Family 17h+ instruction cache events
>>>
>>> PMCx080 and PMCx081 report incorrect IC accesses and misses respectively
>>> for all Family 17h and later processors. PMCx060 unit mask 0x10 replaces
>>> PMCx081 for counting IC misses but there is no suitable replacement for
>>> counting IC accesses.
>>
>> can you link to the errata document that describes this problem as well as 
>> maybe give a rundown of how and why this breaks?
> 
> I've delayed this patch until these details are cleared up.
> 

Both of these events were removed from the Processor Programming Reference
starting with Zen 2. Errata is missing for Zen 1 but it is known that these
events are broken. A quick test like the following will show that PMCx081
undercounts IC misses compared to PMCx060 with unit mask 0x10.

$ perf stat -e "{cpu/event=0x81/,cpu/event=0x60,umask=0x10/}" ./ic-miss

 Performance counter stats for './ic-miss':

             2,105      cpu/event=0x81/u
            30,826      cpu/event=0x60,umask=0x10/u

       1.650143599 seconds time elapsed

       1.646070000 seconds user
       0.000998000 seconds sys

If its acceptable, I can send out a v2 with the details above.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ