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:	Mon, 26 Dec 2011 13:21:51 +0200
From:	Gleb Natapov <gleb@...hat.com>
To:	Avi Kivity <avi@...hat.com>
Cc:	Liu Ping Fan <kernelfans@...il.com>, kvm@...r.kernel.org,
	linux-kernel@...r.kernel.org, aliguori@...ibm.com,
	mtosatti@...hat.com, jan.kiszka@....de
Subject: Re: [PATCH v5] kvm: make vcpu life cycle separated from kvm instance

On Mon, Dec 26, 2011 at 01:17:39PM +0200, Avi Kivity wrote:
> On 12/26/2011 01:09 PM, Gleb Natapov wrote:
> > > +
> > > +		idx = srcu_read_lock(&kvm->srcu_vcpus);
> > > +		kvm_for_each_vcpu(vcpu, kvm) {
> > > +			if (!pass && !firststart &&
> > > +			    vcpu != kvm->last_boosted_vcpu &&
> > > +			    kvm->last_boosted_vcpu != NULL) {
> > > +				vcpu = kvm->last_boosted_vcpu;
> > You access last_boosted_vcpu as if it is protected by srcu, but it
> > isn't. kvm_vcpu_release() changes it after synchronize_srcu_expedited()
> > call.
> >
> > I do not like this last_boosted_vcpu pointer much. May be we can rid of
> > it by remembering last apic_id and searching for it each time we enter
> > the function. I do not think this function is to performance sensitive.
> > We enter here when vcpu is spinning anyway.
> 
> We aren't guaranteed to have an apic_id, so it has to be done using rcu,
> or maybe vcpu_id.  I prefer using srcu, we can't run away from vcpu
> pointers.
> 
Yeah, I meant vcpu_id (it is used as initial apic_id for x86, but this
code is not x86 specific).

--
			Gleb.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ