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] [day] [month] [year] [list]
Date:   Mon, 24 Oct 2022 13:24:01 -0700
From:   Vipin Sharma <vipinsh@...gle.com>
To:     Sean Christopherson <seanjc@...gle.com>
Cc:     Vitaly Kuznetsov <vkuznets@...hat.com>, pbonzini@...hat.com,
        dmatlack@...gle.com, kvm@...r.kernel.org, shujunxue@...gle.com,
        terrytaehyun@...gle.com, linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH] Add Hyperv extended hypercall support in KVM

On Mon, Oct 24, 2022 at 12:36 PM Sean Christopherson <seanjc@...gle.com> wrote:
>
> On Mon, Oct 24, 2022, Vipin Sharma wrote:
> > On Mon, Oct 24, 2022 at 8:22 AM Sean Christopherson <seanjc@...gle.com> wrote:
> > >
> > > On Mon, Oct 24, 2022, Vitaly Kuznetsov wrote:
> > > enable():
> > >
> > >         case KVM_CAP_HYPERV_EXT_CALL:
> > >                 r = -EINVAL;
> > >                 if (mask & ~KVM_SUPPORTED_HYPERV_EXT_CALL)
> > >                         break;
> > >
> > >                 mutex_lock(&kvm->lock);
> > >                 if (!kvm->created_vcpus) {
> >
> > Any reason for setting capability only after vcpus are created?
>
> This only allows setting the capability _before_ vCPUs are created.  Attempting
> to set the cap after vCPUs are created gets rejected with -EINVAL.  This
> requirement means vCPUs don't need to take a lock to consume per-VM state, as KVM
> prevents the state from changing once vCPUs are created.

I totally misread the condition and didn't notice the '!' in the if()
statement.

Thanks for the feedback.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ