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: <ap4FOrto78iOuRRggmgRTphowIopQYqbTDWXbRr82-Ipk_351W6863FJjJHWjrGFsZanu7_C3YrIXCdmCVziB1V4E-Rsn4Tp698EBJPR0C4=@protonmail.com>
Date:   Mon, 20 Jan 2020 14:20:05 +0000
From:   Krzysztof Piecuch <piecuch@...tonmail.com>
To:     Thomas Gleixner <tglx@...utronix.de>
Cc:     Andy Lutomirski <luto@...capital.net>,
        "corbet\\@lwn.net" <corbet@....net>,
        "mingo\\@redhat.com" <mingo@...hat.com>,
        "bp\\@alien8.de" <bp@...en8.de>, "hpa\\@zytor.com" <hpa@...or.com>,
        "x86\\@kernel.org" <x86@...nel.org>,
        "mchehab+samsung\\@kernel.org" <mchehab+samsung@...nel.org>,
        "jpoimboe\\@redhat.com" <jpoimboe@...hat.com>,
        "gregkh\\@linuxfoundation.org" <gregkh@...uxfoundation.org>,
        "pawan.kumar.gupta\\@linux.intel.com" 
        <pawan.kumar.gupta@...ux.intel.com>,
        "paulmck\\@linux.ibm.com" <paulmck@...ux.ibm.com>,
        "jgross\\@suse.com" <jgross@...e.com>,
        "rafael.j.wysocki\\@intel.com" <rafael.j.wysocki@...el.com>,
        "viresh.kumar\\@linaro.org" <viresh.kumar@...aro.org>,
        "drake\\@endlessm.com" <drake@...lessm.com>,
        "malat\\@debian.org" <malat@...ian.org>,
        "mzhivich\\@akamai.com" <mzhivich@...mai.com>,
        "juri.lelli\\@redhat.com" <juri.lelli@...hat.com>,
        "linux-doc\\@vger.kernel.org" <linux-doc@...r.kernel.org>,
        "linux-kernel\\@vger.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] x86/tsc: Add tsc_tuned_baseclk flag disabling CPUID.16h use for tsc calibration

On Monday, January 20, 2020 1:42 PM, Thomas Gleixner <tglx@...utronix.de> wrote:
>
> Simply because all of this is horribly fragile and if you put virt into
> the picture it gets even worse.
>
> The initial calibration via PIT/HPET is halfways accurate in most cases
> and we use the 1% as a sanity check.
>
> > Ideally it would be better to get the early calibration right than
> > risk getting it wrong because of an "anomaly".
>
> Ideally we would just have a way to read the stupid frequency from some
> reliable place, but there is no such thing.
>
> Guess why we have all this code, surely not because we have nothing
> better to do than dreaming up a variety of weird ways to figure out that
> frequency.

Thank you for the explanation.

> Widening the error window here is clearly a hack. As you have to supply
> a valid number there, then why not just providing the frequency itself
> on the command line? That would at least make most sense and would avoid
> to use completely wrong data in the early boot stage.

That sounds good.
I'll assume that the user will be supposed to provide a flag tsc_early_hz=
so that refine_calibration_work can get better numbers while still doing
the 1% sanity check.

I'll send a patch this week.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ