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:   Sun, 26 Apr 2020 23:01:17 +0800
From:   Yang Weijiang <weijiang.yang@...el.com>
To:     Paolo Bonzini <pbonzini@...hat.com>
Cc:     Sean Christopherson <sean.j.christopherson@...el.com>,
        Yang Weijiang <weijiang.yang@...el.com>, kvm@...r.kernel.org,
        linux-kernel@...r.kernel.org, jmattson@...gle.com,
        yu.c.zhang@...ux.intel.com
Subject: Re: [PATCH v11 5/9] KVM: X86: Refresh CPUID once guest XSS MSR
 changes

On Sat, Apr 25, 2020 at 03:19:24PM +0200, Paolo Bonzini wrote:
> On 23/04/20 19:34, Sean Christopherson wrote:
> >>  	if (!kvm_cpu_cap_has(X86_FEATURE_XSAVES))
> >>  		supported_xss = 0;
> >> +	else
> >> +		supported_xss = host_xss & KVM_SUPPORTED_XSS;
> > Silly nit: I'd prefer to invert the check, e.g.
> > 
> > 	if (kvm_cpu_cap_has(X86_FEATURE_XSAVES))
> > 		supported_xss = host_xss & KVM_SUPPORTED_XSS;
> > 	else
> > 		supported_xss = 0;
> > 
> 
> Also a nit: Linux coding style should be
> 
> 	supported_xss = 0;
> 	if (kvm_cpu_cap_has(X86_FEATURE_XSAVES))
> 		supported_xss = host_xss & KVM_SUPPORTED_XSS;
> 
> Paolo
Ah, I should follow the coding style, thank you Paolo!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ