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]
Message-ID: <0a628969-e4f6-a463-04e5-889e7b423602@oracle.com>
Date:   Thu, 23 Mar 2017 10:39:10 -0400
From:   Pasha Tatashin <pasha.tatashin@...cle.com>
To:     Thomas Gleixner <tglx@...utronix.de>
Cc:     Peter Zijlstra <peterz@...radead.org>, x86@...nel.org,
        linux-kernel@...r.kernel.org, mingo@...hat.com, hpa@...or.com
Subject: Re: [v1 0/9] Early boot time stamps for x86

Hi Thomas,

Thank you very much for looking at this patchset. Comments below:

On 03/23/2017 06:56 AM, Thomas Gleixner wrote:
> On Wed, 22 Mar 2017, Pasha Tatashin wrote:
>> Yes, I am certain it is 0 or  near 0 on reset on this machine. Because, I
>
> Emphasis on "this machine'
>
> It's not guaranteed especially not on reboot and not with creative BIOSes
> fiddling with the TSC_ADJUST value.
>
>  - It CANNOT be used to measure BIOS boot time reliably

Yes, understood, I will remove comment about BIOS time from the next 
cover letter.

However, I think the pr_info() with offset is still useful at least for 
those whose BIOS does not alter TSC_ADJUST, also it is consisten with 
every other clocksource in linux where offset is printed in pr_info().

 From Intel PRM 2016/12:
The time-stamp counter (as implemented in the P6 family, Pentium, 
Pentium M, Pentium 4, Intel Xeon, Intel Core Solo and Intel Core Duo 
processors and later processors) is a 64-bit counter that is set to 0 
following a RESET of the processor

Since early boot time stamps feature target processors that are later 
than "Pentium 4" because invariant TSC flag is checked, it is safe to 
assume that offset is going to be valid on power-on if TSC_ADJUST  was 
not altered

>
>  - If BIOS wreckaged TSC_ADJUST, then your whole time stamping goes out the
>    window once the kernel sanitized it.

I will add a condition to tsc_early_init() to check for TSC_ADJUST if it 
is not 0, disable early TSC feature. Does this sound OK?

Thank you,
Pasha

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ