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]
Date:   Fri, 4 Dec 2020 09:47:59 +0100
From:   Paolo Bonzini <pbonzini@...hat.com>
To:     Jacob Xu <jacobhxu@...gle.com>,
        Sean Christopherson <seanjc@...gle.com>,
        Jim Mattson <jmattson@...gle.com>,
        Oliver Upton <oupton@...gle.com>
Cc:     kvm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] kvm: svm: de-allocate svm_cpu_data for all cpus in
 svm_cpu_uninit()

On 03/12/20 21:59, Jacob Xu wrote:
> The cpu arg for svm_cpu_uninit() was previously ignored resulting in the
> per cpu structure svm_cpu_data not being de-allocated for all cpus.
> 
> Signed-off-by: Jacob Xu <jacobhxu@...gle.com>
> ---
>   arch/x86/kvm/svm/svm.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/x86/kvm/svm/svm.c b/arch/x86/kvm/svm/svm.c
> index 79b3a564f1c9..da7eb4aaf44f 100644
> --- a/arch/x86/kvm/svm/svm.c
> +++ b/arch/x86/kvm/svm/svm.c
> @@ -530,12 +530,12 @@ static int svm_hardware_enable(void)
>   
>   static void svm_cpu_uninit(int cpu)
>   {
> -	struct svm_cpu_data *sd = per_cpu(svm_data, raw_smp_processor_id());
> +	struct svm_cpu_data *sd = per_cpu(svm_data, cpu);
>   
>   	if (!sd)
>   		return;
>   
> -	per_cpu(svm_data, raw_smp_processor_id()) = NULL;
> +	per_cpu(svm_data, cpu) = NULL;
>   	kfree(sd->sev_vmcbs);
>   	__free_page(sd->save_area);
>   	kfree(sd);
> 

Queued, thanks.

Paolo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ