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]
Message-ID: <0b90c11b-0dce-60f3-c98d-3441b418e771@redhat.com>
Date:   Mon, 25 Jan 2021 20:35:08 +0100
From:   Paolo Bonzini <pbonzini@...hat.com>
To:     Sean Christopherson <seanjc@...gle.com>
Cc:     linux-kernel@...r.kernel.org, kvm@...r.kernel.org,
        stable@...r.kernel.org
Subject: Re: [PATCH] KVM: x86: allow KVM_REQ_GET_NESTED_STATE_PAGES outside
 guest mode for VMX

On 25/01/21 20:16, Sean Christopherson wrote:
>>   }
>>   
>> +static bool vmx_get_nested_state_pages(struct kvm_vcpu *vcpu)
>> +{
>> +	if (!nested_get_evmcs_page(vcpu))
>> +		return false;
>> +
>> +	if (is_guest_mode(vcpu) && !nested_get_vmcs12_pages(vcpu))
>> +		return false;
> nested_get_evmcs_page() will get called twice in the common case of
> is_guest_mode() == true.  I can't tell if that will ever be fatal, but it's
> definitely weird.  Maybe this?
> 
> 	if (!is_guest_mode(vcpu))
> 		return nested_get_evmcs_page(vcpu);
> 
> 	return nested_get_vmcs12_pages(vcpu);
> 

I wouldn't say there is a common case; however the idea was to remove 
the call to nested_get_evmcs_page from nested_get_vmcs12_pages, since 
that one is only needed after KVM_GET_NESTED_STATE and not during 
VMLAUNCH/VMRESUME.

Paolo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ