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, 1 Nov 2023 06:33:05 +0000
From:   "Huang, Kai" <kai.huang@...el.com>
To:     "nik.borisov@...e.com" <nik.borisov@...e.com>,
        "Christopherson,, Sean" <seanjc@...gle.com>
CC:     "kvm@...r.kernel.org" <kvm@...r.kernel.org>,
        "pbonzini@...hat.com" <pbonzini@...hat.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "x86@...nel.org" <x86@...nel.org>
Subject: Re: [PATCH] KVM: x86: User mutex guards to eliminate
 __kvm_x86_vendor_init()

On Mon, 2023-10-30 at 18:17 +0200, Nikolay Borisov wrote:
> 
> On 30.10.23 г. 18:07 ч., Sean Christopherson wrote:
> > On Mon, Oct 30, 2023, Nikolay Borisov wrote:
> > > Current separation between (__){0,1}kvm_x86_vendor_init() is superfluos as
> > 
> > superfluous
> > 
> > But this intro is actively misleading.  The double-underscore variant most definitely
> > isn't superfluous, e.g. it eliminates the need for gotos reduces the probability
> > of incorrect error codes, bugs in the error handling, etc.  It _becomes_ superflous
> > after switching to guard(mutex).
> > 
> > IMO, this is one of the instances where the "problem, then solution" appoach is
> > counter-productive.  If there are no objections, I'll massage the change log to
> > the below when applying (for 6.8, in a few weeks).
> > 
> >    Use the recently introduced guard(mutex) infrastructure acquire and
> >    automatically release vendor_module_lock when the guard goes out of scope.
> >    Drop the inner __kvm_x86_vendor_init(), its sole purpose was to simplify
> >    releasing vendor_module_lock in error paths.
> > 
> >    No functional change intended.
> 
> Thanks, I'm fine with this changelog.
> 
> 

Reviewed-by: Kai Huang <kai.huang@...el.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ