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, 5 Feb 2020 06:32:26 -0800
From:   Sean Christopherson <sean.j.christopherson@...el.com>
To:     Vitaly Kuznetsov <vkuznets@...hat.com>
Cc:     Wanpeng Li <wanpengli@...cent.com>,
        Jim Mattson <jmattson@...gle.com>,
        Joerg Roedel <joro@...tes.org>, kvm@...r.kernel.org,
        linux-kernel@...r.kernel.org, Paolo Bonzini <pbonzini@...hat.com>
Subject: Re: [PATCH 01/26] KVM: x86: Remove superfluous brackets from case
 statement

On Wed, Feb 05, 2020 at 03:29:28PM +0100, Vitaly Kuznetsov wrote:
> Sean Christopherson <sean.j.christopherson@...el.com> writes:
> 
> > Remove unnecessary brackets from a case statement that unintentionally
> > encapsulates unrelated case statements in the same switch statement.
> > While technically legal and functionally correct syntax, the brackets
> > are visually confusing and potentially dangerous, e.g. the last of the
> > encapsulated case statements has an undocumented fall-through that isn't
> > flagged by compilers due the encapsulation.
> >
> > Signed-off-by: Sean Christopherson <sean.j.christopherson@...el.com>
> > ---
> >  arch/x86/kvm/x86.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
> > index 7e3f1d937224..24597526b5de 100644
> > --- a/arch/x86/kvm/x86.c
> > +++ b/arch/x86/kvm/x86.c
> > @@ -5260,7 +5260,7 @@ static void kvm_init_msr_list(void)
> >  				 !intel_pt_validate_hw_cap(PT_CAP_single_range_output)))
> >  				continue;
> >  			break;
> > -		case MSR_IA32_RTIT_ADDR0_A ... MSR_IA32_RTIT_ADDR3_B: {
> > +		case MSR_IA32_RTIT_ADDR0_A ... MSR_IA32_RTIT_ADDR3_B:
> >  			if (!kvm_x86_ops->pt_supported() ||
> >  				msrs_to_save_all[i] - MSR_IA32_RTIT_ADDR0_A >=
> >  				intel_pt_validate_hw_cap(PT_CAP_num_address_ranges) * 2)
> > @@ -5275,7 +5275,7 @@ static void kvm_init_msr_list(void)
> >  			if (msrs_to_save_all[i] - MSR_ARCH_PERFMON_EVENTSEL0 >=
> >  			    min(INTEL_PMC_MAX_GENERIC, x86_pmu.num_counters_gp))
> >  				continue;
> > -		}
> > +			break;
> >  		default:
> >  			break;
> >  		}
> 
> Reviewed-by: Vitaly Kuznetsov <vkuznets@...hat.com>

Thanks for the review(s), but don't bother reviewing the rest of this
series.  Most of it is superseded by the kvm_cpu_caps mega-series, and
I'll spin the MSR patches into their own series.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ