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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87y1sdqh1t.ffs@tglx>
Date:   Mon, 14 Nov 2022 23:58:54 +0100
From:   Thomas Gleixner <tglx@...utronix.de>
To:     Dave Hansen <dave.hansen@...el.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Rishabh Agrawal <rishabhagr@...omium.org>
Cc:     LKML <linux-kernel@...r.kernel.org>, len.brown@...el.com,
        drake@...lessm.com, rafael.j.wysocki@...el.com, mingo@...hat.com,
        vaibhav.shankar@...el.com, biernacki@...gle.com,
        zwisler@...gle.com, mattedavis@...gle.com,
        Borislav Petkov <bp@...en8.de>,
        Dave Hansen <dave.hansen@...ux.intel.com>,
        Feng Tang <feng.tang@...el.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        "H. Peter Anvin" <hpa@...or.com>, x86@...nel.org
Subject: Re: [PATCH v2] Add hardcoded crystal clock for KabyLake

On Thu, Oct 20 2022 at 10:18, Dave Hansen wrote:
> On 10/20/22 10:13, Peter Zijlstra wrote:
>> And why, pray *WHY* can't Intel simply write the correct information in
>> CPUID leaf 15h. I mean, they defined the leaf, might as well use it, no?
>
> Is the data that's in the leaf just wrong?  Doesn't that mean that the
> CPUID leaf on these models is violating the architecture contract?  That
> sounds like something that deserves an erratum.
>
> Is there a documented erratum?

I don't know. The code has this comment:

	/*
	 * Some Intel SoCs like Skylake and Kabylake don't report the crystal
	 * clock, but we can easily calculate it to a high degree of accuracy
	 * by considering the crystal ratio and the CPU speed.
	 */

so those SoCs fail to expose clock in leaf 15h and then the information
in leaf 16h is so inaccurate that the calculation is off.

Sigh. It's 2022 and we are still relying on crystalball mechanisms to
figure out the damned crystal frequency.

The specification of leaf 15h is:

 15H Time Stamp Counter and Nominal Core Crystal Clock Information Leaf
    NOTES:
        If EBX[31:0] is 0, the TSC/”core crystal clock” ratio is not enumerated.
        If ECX is 0, the nominal core crystal clock frequency is not enumerated.

IOW, this CPUID leaf is defined to be useless and leaves it up to the
SoC integration to provide this information or not. It needs even two
fields to chose from to make it useless...

I'm sure this took 10+ draft versions and consumed a non-quantifiable
amount of work hours to come up with this joke.

Thanks,

        tglx

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ