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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 9 Nov 2016 17:03:55 -0500 (EST)
From:   Paolo Bonzini <pbonzini@...hat.com>
To:     Marcelo Tosatti <mtosatti@...hat.com>
Cc:     linux-kernel@...r.kernel.org, kvm@...r.kernel.org,
        Radim Krčmář <rkrcmar@...hat.com>
Subject: Re: [PATCH] kvm: kvmclock: let KVM_GET_CLOCK return whether the
 master clock is in use



----- Original Message -----
> From: "Marcelo Tosatti" <mtosatti@...hat.com>
> To: "Paolo Bonzini" <pbonzini@...hat.com>
> Cc: linux-kernel@...r.kernel.org, kvm@...r.kernel.org, "Radim Krčmář" <rkrcmar@...hat.com>
> Sent: Wednesday, November 9, 2016 9:17:19 PM
> Subject: Re: [PATCH] kvm: kvmclock: let KVM_GET_CLOCK return whether the master clock is in use
> 
> On Wed, Nov 09, 2016 at 06:12:50PM -0200, Marcelo Tosatti wrote:
> > On Wed, Nov 09, 2016 at 05:48:15PM +0100, Paolo Bonzini wrote:
> > > Userspace can read the exact value of kvmclock by reading the TSC
> > > and fetching the timekeeping parameters out of guest memory.  This
> > > however is brittle and not necessary anymore with KVM 4.11.
> > 
> > Hi Paolo,
> > 
> > Can you point to commit or explanation why that is not the case anymore?
> > Thanks
> 
> I don't see how thats possible given the:
> 
>  * TSC
>  * TSC (timer interrupt + TSC deltas) (AKA host TSC clocksource and
>  * CLOCK_MONOTONIC).
>  
> Clocks currently drift from each other (therefore are not monotonic).

__get_kernel_ns now computes the guest's kvmclock directly when using the
master clock.  Instead of peeking at guest memory, it does it from the
hypervisor's copy of the parameters.

Paolo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ