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: <87zhah4evs.fsf@nanos.tec.linutronix.de>
Date:   Sat, 09 May 2020 11:49:27 +0200
From:   Thomas Gleixner <tglx@...utronix.de>
To:     Pali Rohár <pali@...nel.org>
Cc:     linux-kernel@...r.kernel.org
Subject: Re: Missing CLOCK_BOOTTIME_RAW?

Pali,

Pali Rohár <pali@...nel.org> writes:
> On Friday 08 May 2020 22:59:57 Thomas Gleixner wrote:
>> Pali Rohár <pali@...nel.org> writes:
>> Neither CLOCK_BOOTTIME nor CLOCK_MONOTONIC jump. They are frequency
>> corrected when NTP, PTP or PPS are in use. The frequency correction is
>> incremental an smothed. They really don't jump and they give you proper
>> time in nanoseconds which is as close to the real nanoseconds as it
>> gets.
>
> Hello! I should have been more precise about it. CLOCK_BOOTTIME and
> CLOCK_MONOTONIC do not jump but I understood that they are affected by
> adjtime(). So these clocks may tick faster or slower than real time. NTP
> daemon when see that CLOCK_REALTIME is incorrect, it may speed up or
> slow down its ticking. And this is affected also by CLOCK_BOOTTIME and
> CLOCK_MONOTONIC, right?

Sure, but what's the problem? The adjustemt is done to make the observed
time as correct as possible.

> You wrote that this clock is subject to drifts. What exactly may happen
> with CLOCK_MONOTONIC_RAW?

  1) As the frequency of the raw clock is an estimate, resulting time
     is drifting apart vs. the correct frequency.

  2) Depending on the crystal/oszillator there can be temperatur drift as
     well.

Just for clarification. Even with NTP/PTP adjustment the resulting time
stamps are never going to be precise vs. an atomic clock, but good
enough for 99.9999% of the problems.

TBH, I have no idea what real world problem you are trying to solve.

Thanks,

        tglx

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ