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:   Thu, 18 Mar 2021 18:55:30 +0100
From:   Paolo Bonzini <pbonzini@...hat.com>
To:     Wanpeng Li <kernellwp@...il.com>, linux-kernel@...r.kernel.org,
        kvm@...r.kernel.org
Cc:     Sean Christopherson <seanjc@...gle.com>,
        Vitaly Kuznetsov <vkuznets@...hat.com>,
        Wanpeng Li <wanpengli@...cent.com>,
        Jim Mattson <jmattson@...gle.com>,
        Joerg Roedel <joro@...tes.org>, Nadav Amit <namit@...are.com>
Subject: Re: [PATCH] KVM: X86: Fix missing local pCPU when executing wbinvd on
 all dirty pCPUs

On 12/03/21 03:45, Wanpeng Li wrote:
> From: Wanpeng Li <wanpengli@...cent.com>
> 
> We should execute wbinvd on all dirty pCPUs when guest wbinvd exits
> to maintain datat consistency in order to deal with noncoherent DMA.
> smp_call_function_many() does not execute the provided function on
> the local core, this patch replaces it by on_each_cpu_mask().
> 
> Reported-by: Nadav Amit <namit@...are.com>
> Cc: Nadav Amit <namit@...are.com>
> Signed-off-by: Wanpeng Li <wanpengli@...cent.com>
> ---
>   arch/x86/kvm/x86.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
> index 012d5df..aa6d667 100644
> --- a/arch/x86/kvm/x86.c
> +++ b/arch/x86/kvm/x86.c
> @@ -6638,7 +6638,7 @@ static int kvm_emulate_wbinvd_noskip(struct kvm_vcpu *vcpu)
>   		int cpu = get_cpu();
>   
>   		cpumask_set_cpu(cpu, vcpu->arch.wbinvd_dirty_mask);
> -		smp_call_function_many(vcpu->arch.wbinvd_dirty_mask,
> +		on_each_cpu_mask(vcpu->arch.wbinvd_dirty_mask,
>   				wbinvd_ipi, NULL, 1);
>   		put_cpu();
>   		cpumask_clear(vcpu->arch.wbinvd_dirty_mask);
> 

Queued, thanks.

Paolo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ