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: <C24A57FB-5898-411B-90B4-58252BC22CE9@fb.com>
Date: Wed, 16 Apr 2025 19:15:25 +0000
From: Song Liu <songliubraving@...a.com>
To: Sandipan Das <sandipan.das@....com>
CC: "linux-perf-users@...r.kernel.org" <linux-perf-users@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "peterz@...radead.org" <peterz@...radead.org>,
        "mingo@...hat.com"
	<mingo@...hat.com>,
        "acme@...nel.org" <acme@...nel.org>,
        "namhyung@...nel.org" <namhyung@...nel.org>,
        "mark.rutland@....com"
	<mark.rutland@....com>,
        "alexander.shishkin@...ux.intel.com"
	<alexander.shishkin@...ux.intel.com>,
        "jolsa@...nel.org" <jolsa@...nel.org>,
        "irogers@...gle.com" <irogers@...gle.com>,
        "adrian.hunter@...el.com"
	<adrian.hunter@...el.com>,
        "kan.liang@...ux.intel.com"
	<kan.liang@...ux.intel.com>,
        "tglx@...utronix.de" <tglx@...utronix.de>,
        "bp@...en8.de" <bp@...en8.de>,
        "dave.hansen@...ux.intel.com"
	<dave.hansen@...ux.intel.com>,
        "x86@...nel.org" <x86@...nel.org>, "hpa@...or.com" <hpa@...or.com>,
        "eranian@...gle.com" <eranian@...gle.com>,
        Song Liu <songliubraving@...a.com>,
        "ravi.bangoria@....com"
	<ravi.bangoria@....com>,
        "ananth.narayan@....com" <ananth.narayan@....com>
Subject: Re: [PATCH 4/4] perf/x86/amd/uncore: Prevent UMC counters from
 saturating



> On Apr 9, 2025, at 12:57 AM, Sandipan Das <sandipan.das@....com> wrote:
> 
> Unlike L3 and DF counters, UMC counters (PERF_CTRs) set the Overflow bit
> (bit 48) and saturate on overflow. A subsequent pmu->read() of the event
> reports an incorrect accumulated count as there is no difference between
> the previous and the current values of the counter.
> 
> To avoid this, inspect the current counter value and proactively reset
> the corresponding PERF_CTR register on every pmu->read(). Combined with
> the periodic reads initiated by the hrtimer, the counters never get a
> chance saturate but the resolution reduces to 47 bits.
> 
> Fixes: 25e56847821f ("perf/x86/amd/uncore: Add memory controller support")
> Signed-off-by: Sandipan Das <sandipan.das@....com>

Reviewed-by: Song Liu <song@...nel.org>

Thanks for the fix!



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ