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: <20251022015909.tqycoqp3qj7bupxl@desk>
Date: Tue, 21 Oct 2025 18:59:09 -0700
From: Pawan Gupta <pawan.kumar.gupta@...ux.intel.com>
To: Sean Christopherson <seanjc@...gle.com>
Cc: Paolo Bonzini <pbonzini@...hat.com>, kvm@...r.kernel.org,
	linux-kernel@...r.kernel.org, Brendan Jackman <jackmanb@...gle.com>
Subject: Re: [PATCH v3 4/4] KVM: x86: Unify L1TF flushing under per-CPU
 variable

On Thu, Oct 16, 2025 at 01:04:17PM -0700, Sean Christopherson wrote:
> --- a/arch/x86/kvm/vmx/vmx.c
> +++ b/arch/x86/kvm/vmx/vmx.c
> @@ -395,26 +395,16 @@ static noinstr bool vmx_l1d_flush(struct kvm_vcpu *vcpu)
>  	 * 'always'
>  	 */
>  	if (static_branch_likely(&vmx_l1d_flush_cond)) {
> -		bool flush_l1d;
> -
>  		/*
> -		 * Clear the per-vcpu flush bit, it gets set again if the vCPU
> +		 * Clear the per-cpu flush bit, it gets set again if the vCPU
>  		 * is reloaded, i.e. if the vCPU is scheduled out or if KVM
>  		 * exits to userspace, or if KVM reaches one of the unsafe
> -		 * VMEXIT handlers, e.g. if KVM calls into the emulator.
> +		 * VMEXIT handlers, e.g. if KVM calls into the emulator,
> +		 * or from the interrupt handlers.
>  		 */
> -		flush_l1d = vcpu->arch.l1tf_flush_l1d;
> -		vcpu->arch.l1tf_flush_l1d = false;
> -
> -		/*
> -		 * Clear the per-cpu flush bit, it gets set again from
> -		 * the interrupt handlers.
> -		 */
> -		flush_l1d |= kvm_get_cpu_l1tf_flush_l1d();
> +		if (!kvm_get_cpu_l1tf_flush_l1d())
> +			return;

This should be returning false here.

>  		kvm_clear_cpu_l1tf_flush_l1d();
> -
> -		if (!flush_l1d)
> -			return false;
>  	}

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ