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:   Thu, 23 Nov 2017 13:58:23 +0100
From:   Petr Mladek <pmladek@...e.com>
To:     Thomas Gleixner <tglx@...utronix.de>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        Linus Torvalds <torvalds@...uxfoundation.org>,
        Prarit Bhargava <prarit@...hat.com>,
        Mark Salyzyn <salyzyn@...roid.com>,
        Ingo Molnar <mingo@...nel.org>,
        "H. Peter Anvin" <hpa@...or.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
        Steven Rostedt <rostedt@...dmis.org>,
        Joe Perches <joe@...ches.com>
Subject: Re: [RFC patch 7/7] timekeeping: Hack to use fine grained timestamps
 during boot

On Wed 2017-11-15 19:15:38, Thomas Gleixner wrote:
> For demonstration purposes only.
> 
> Add a disgusting hack to work around the fact that high resolution clock
> MONOTONIC accessors are not available during early boot and return stale
> time stamps accross suspend/resume when the current clocksource is not
> flagged with CLOCK_SOURCE_SUSPEND_ACCESS_OK.
> 
> Use local_clock() to provide timestamps in early boot and when the
> clocksource is not accessible after timekeeping_suspend(). In the
> suspend/resume case this might cause non monotonic timestamps.

I get the non-monotonic times even during boot:

[    0.026709] smp: Bringing up secondary CPUs ...
[    0.027973] x86: Booting SMP configuration:
[    0.028006] .... node  #0, CPUs:      #1
[    0.004000] kvm-clock: cpu 1, msr 1:3ff51041, secondary cpu clock
     ^^^^^^^^
[    0.032097] KVM setup async PF for cpu 1
[    0.032766] kvm-stealtime: cpu 1, msr 13b00dc40
[    0.036502]  #2
[    0.004000] kvm-clock: cpu 2, msr 1:3ff51081, secondary cpu clock
     ^^^^^^^^
[    0.040062] KVM setup async PF for cpu 2
[    0.040576] kvm-stealtime: cpu 2, msr 13b20dc40
[    0.041304]  #3
[    0.004000] kvm-clock: cpu 3, msr 1:3ff510c1, secondary cpu clock
     ^^^^^^^^
[    0.048051] KVM setup async PF for cpu 3
[    0.048554] kvm-stealtime: cpu 3, msr 13b40dc40


To be honest, I do not feel experienced enough to decide which
solution is acceptable. I would say that only few people care
about timestamps during boot. On the other hand, some tools
might get confused by non-monotonic timestamps. Therefore
I would try to avoid this patch.

But I might be completely wrong. After all, this feature is
done because people wanted to track the time more precisely.
Some of them wanted to have the most precise time even during
suspend and resume. On the other hand, it might be enough
if we allow to get the information from the other
stored timestamps.

Best Regards,
Petr

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ