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]
Date:   Wed, 15 Mar 2023 12:11:28 -0700
From:   Sean Christopherson <seanjc@...gle.com>
To:     Sean Christopherson <seanjc@...gle.com>,
        Paolo Bonzini <pbonzini@...hat.com>
Cc:     kvm@...r.kernel.org, linux-kernel@...r.kernel.org,
        Emanuele Giuseppe Esposito <eesposit@...hat.com>
Subject: [PATCH 2/2] KVM: SVM: Drop unprotected-by-braces variable declaration
 in case-statement

Remove the intermediate "guest_flush_l1d" boolean to fix a build error on
clang due to the variable being declared inside a case-statement without
curly braces to create a proper code block.

Fixes: cfc1f129df06 ("kvm: svm: Add IA32_FLUSH_CMD guest support")
Cc: Emanuele Giuseppe Esposito <eesposit@...hat.com>
Signed-off-by: Sean Christopherson <seanjc@...gle.com>
---
 arch/x86/kvm/svm/svm.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/arch/x86/kvm/svm/svm.c b/arch/x86/kvm/svm/svm.c
index 2780254d4362..70183d2271b5 100644
--- a/arch/x86/kvm/svm/svm.c
+++ b/arch/x86/kvm/svm/svm.c
@@ -2970,9 +2970,8 @@ static int svm_set_msr(struct kvm_vcpu *vcpu, struct msr_data *msr)
 					 PRED_CMD_IBPB, X86_FEATURE_IBPB);
 		break;
 	case MSR_IA32_FLUSH_CMD:
-		bool guest_flush_l1d = guest_cpuid_has(vcpu,
-						       X86_FEATURE_FLUSH_L1D);
-		r = svm_set_msr_ia32_cmd(vcpu, msr, guest_flush_l1d,
+		r = svm_set_msr_ia32_cmd(vcpu, msr,
+					 guest_cpuid_has(vcpu, X86_FEATURE_FLUSH_L1D),
 					 L1D_FLUSH, X86_FEATURE_FLUSH_L1D);
 		break;
 	case MSR_AMD64_VIRT_SPEC_CTRL:
-- 
2.40.0.rc2.332.ga46443480c-goog

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ