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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220911025056.GA873583@ls.amr.corp.intel.com>
Date:   Sat, 10 Sep 2022 19:50:56 -0700
From:   Isaku Yamahata <isaku.yamahata@...il.com>
To:     Chao Gao <chao.gao@...el.com>
Cc:     isaku.yamahata@...el.com, linux-kernel@...r.kernel.org,
        kvm@...r.kernel.org, Paolo Bonzini <pbonzini@...hat.com>,
        Sean Christopherson <seanjc@...gle.com>,
        Marc Zyngier <maz@...nel.org>, Will Deacon <will@...nel.org>,
        Yuan Yao <yuan.yao@...ux.intel.com>, isaku.yamahata@...il.com,
        Kai Huang <kai.huang@...el.com>,
        Atish Patra <atishp@...shpatra.org>,
        Shaokun Zhang <zhangshaokun@...ilicon.com>,
        Qi Liu <liuqi115@...wei.com>,
        John Garry <john.garry@...wei.com>,
        Daniel Lezcano <daniel.lezcano@...aro.org>,
        Huang Ying <ying.huang@...el.com>,
        Huacai Chen <chenhuacai@...nel.org>
Subject: Re: [PATCH v4 13/26] KVM: Add arch hook when VM is added/deleted

On Fri, Sep 09, 2022 at 02:08:04PM +0800,
Chao Gao <chao.gao@...el.com> wrote:

> >+static void kvm_del_vm(void)
> >+{
> >+	cpus_read_lock();
> >+	mutex_lock(&kvm_lock);
> >+	kvm_arch_del_vm(kvm_usage_count);
> >+	mutex_unlock(&kvm_lock);
> >+	cpus_read_unlock();
> 
> kvm_arch_del_vm() is an empty function now. I don't understand why
> cpus_read_lock() is needed. Maybe add the lock when you fill up
> kvm_arch_del_vm().

The next patch populates it with on_each_cpu(hardware_disable_nolock, NULL, 1);
I will move adding lock to the next one. Or revise how adding arch hooks and
populating part.
-- 
Isaku Yamahata <isaku.yamahata@...il.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ