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: <d040f336-7418-441d-3ccf-698818aad270@redhat.com>
Date:   Wed, 2 Aug 2017 19:21:16 +0200
From:   Paolo Bonzini <pbonzini@...hat.com>
To:     John Stultz <john.stultz@...aro.org>,
        Denis Plotnikov <dplotnikov@...tuozzo.com>
Cc:     Radim Krcmar <rkrcmar@...hat.com>, kvm list <kvm@...r.kernel.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>,
        "H. Peter Anvin" <hpa@...or.com>,
        lkml <linux-kernel@...r.kernel.org>,
        "x86@...nel.org" <x86@...nel.org>, rkagan@...tuozzo.com,
        den@...tuozzo.com
Subject: Re: [PATCH v4 01/10] timekeeper: introduce extended clocksource
 reading callback

On 02/08/2017 19:08, John Stultz wrote:
>> +       bool (*read_with_stamp)(struct clocksource *cs,
>> +                               u64 *cycles, u64 *cycles_stamp);
>>         u64 mask;
> I'm not really fan of an interface that leaks magic data to users that
> know enough.
> 
> And its not clear from this if the magic data is standardized or
> different clocksources export different data?
> 
> What exactly are the attributes you're trying to pull from the
> lower-level hardware that you can't get otherwise (without using the
> update_pvclock_gtod() since, if I'm understanding that apparently
> gives you too much detail to deal with)?

We need the exact TSC value that was used to compute the ktime.  This is
 different between TSC and kvmclock because TSC's read() callback
returns  cycles (of course), while kvmclock's read() callback returns
nanoseconds.

In turn, kvmclock's read() callback returns nanoseconds because it has
to check the read against the host-provided seqlock, so this cannot be
changed.

Paolo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ