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]
Date:   Mon, 14 Aug 2023 15:43:48 +0100
From:   John Garry <john.g.garry@...cle.com>
To:     James Clark <james.clark@....com>,
        linux-perf-users@...r.kernel.org, irogers@...gle.com,
        renyu.zj@...ux.alibaba.com
Cc:     Will Deacon <will@...nel.org>, Mike Leach <mike.leach@...aro.org>,
        Leo Yan <leo.yan@...aro.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>,
        Arnaldo Carvalho de Melo <acme@...nel.org>,
        Mark Rutland <mark.rutland@....com>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Jiri Olsa <jolsa@...nel.org>,
        Namhyung Kim <namhyung@...nel.org>,
        Adrian Hunter <adrian.hunter@...el.com>,
        Suzuki K Poulose <suzuki.poulose@....com>,
        Kan Liang <kan.liang@...ux.intel.com>,
        Nick Forrington <nick.forrington@....com>,
        Kajol Jain <kjain@...ux.ibm.com>,
        Eduard Zingerman <eddyz87@...il.com>,
        Sohom Datta <sohomdatta1@...il.com>,
        Rob Herring <robh@...nel.org>, linux-kernel@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org, coresight@...ts.linaro.org
Subject: Re: [PATCH v5 2/6] perf arm64: Allow version comparisons of CPU IDs

On 14/08/2023 15:15, James Clark wrote:
> 
> On 14/08/2023 14:07, John Garry wrote:
>> On 11/08/2023 15:39, James Clark wrote:
>>> Currently variant and revision fields are masked out of the MIDR so
>>> it's not possible to compare different versions of the same CPU.
>>> In a later commit a workaround will be removed just for N2 r0p3, so
>>> enable comparisons on version.
>>>
>>> This has the side effect of changing the MIDR stored in the header of
>>> the perf.data file to no longer have masked version fields.
>> Did you consider adding a raw version of _get_cpuid(), which returns the
>> full MIDR just for the purpose of caller strcmp_cpuid_str()?
> I did, but I thought that seeing as it would only be used in one place,
> and that changing the existing one didn't break anything, that it was
> better to not fragment the CPU ID interface. I thought it might also
> have repercussions for the other architectures as well. It would also
> mean that the MIDR that's stored in the header wouldn't have the version
> information, which if we're starting to do things with that could be bad.
> 
> There are already callers of strcmp_cpuid_str() so it's probably best to
> keep it using the same get_cpuid() string. Unless there is a reason
> _not_  to do it? There isn't really anything that can't be done with it
> accepting/returning the full unmasked MIDR. If you want the old
> behavior, you just set the version fields to 0, which I've also used in
> a later patch and is already done in mapfile.csv
> 

ok, fine, so we seems that we would be following x86 on this in terms of 
using strcmp_cpuid_str(). It would be good to mention that there is 
already a weak version of strcmp_cpuid_str() for !x86 in your commit 
message.

Let me check your code again...

Thanks,
John

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ