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: <Yk8OJ5Y1IKky9cnz@google.com>
Date:   Thu, 7 Apr 2022 16:15:35 +0000
From:   Sean Christopherson <seanjc@...gle.com>
To:     Vitaly Kuznetsov <vkuznets@...hat.com>
Cc:     kvm@...r.kernel.org, Paolo Bonzini <pbonzini@...hat.com>,
        Wanpeng Li <wanpengli@...cent.com>,
        Jim Mattson <jmattson@...gle.com>,
        Naresh Kamboju <naresh.kamboju@...aro.org>,
        Maxim Levitsky <mlevitsk@...hat.com>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] KVM: x86: hyper-v: Avoid writing to TSC page without an
 active vCPU

On Thu, Apr 07, 2022, Vitaly Kuznetsov wrote:
> diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
> index 676705ad1e23..3460bcd75bf2 100644
> --- a/arch/x86/include/asm/kvm_host.h
> +++ b/arch/x86/include/asm/kvm_host.h
> @@ -979,10 +979,10 @@ enum hv_tsc_page_status {
>  	HV_TSC_PAGE_GUEST_CHANGED,
>  	/* TSC page MSR was written by KVM userspace, update pending */
>  	HV_TSC_PAGE_HOST_CHANGED,
> +	/* TSC page needs to be updated due to internal KVM changes */
> +	HV_TSC_PAGE_KVM_CHANGED,

Why add KVM_CHANGED?  I don't see any reason to differentiate between userspace
and KVM, and using KVM_CHANGED for the kvm_vm_ioctl_set_clock() case is wrong as
that is very much a userspace initiated update, not a KVM update.

>  	/* TSC page was properly set up and is currently active  */
>  	HV_TSC_PAGE_SET,
> -	/* TSC page is currently being updated and therefore is inactive */
> -	HV_TSC_PAGE_UPDATING,
>  	/* TSC page was set up with an inaccessible GPA */
>  	HV_TSC_PAGE_BROKEN,
>  };

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ