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] [day] [month] [year] [list]
Message-ID: <3896e3b5-0e6c-858a-8e4f-732ab03b7286@redhat.com>
Date:   Thu, 24 Feb 2022 15:23:43 +0100
From:   Paolo Bonzini <pbonzini@...hat.com>
To:     Peng Hao <flyingpenghao@...il.com>, seanjc@...gle.com
Cc:     kvm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] KVM:nVMX: Make setup/unsetup under the same conditions

On 2/22/22 11:40, Peng Hao wrote:
> From: Peng Hao <flyingpeng@...cent.com>
> 
> Make sure nested_vmx_hardware_setup/unsetup() are called in pairs under
> the same conditions.  Calling nested_vmx_hardware_unsetup() when nested
> is false "works" right now because it only calls free_page() on zero-
> initialized pointers, but it's possible that more code will be added to
> nested_vmx_hardware_unsetup() in the future.
> 
> Reviewed-by: Sean Christopherson <seanjc@...gle.com>
> Signed-off-by: Peng Hao <flyingpeng@...cent.com>
> ---
>   arch/x86/kvm/vmx/vmx.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c
> index 75ed7d6f35cc..9fad3c73395a 100644
> --- a/arch/x86/kvm/vmx/vmx.c
> +++ b/arch/x86/kvm/vmx/vmx.c
> @@ -7852,7 +7852,7 @@ static __init int hardware_setup(void)
>   	vmx_set_cpu_caps();
>   
>   	r = alloc_kvm_area();
> -	if (r)
> +	if (r && nested)
>   		nested_vmx_hardware_unsetup();
>   
>   	kvm_set_posted_intr_wakeup_handler(pi_wakeup_handler);

Queued, thanks.

Paolo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ