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:	Wed, 05 May 2010 15:52:14 +0300
From:	Avi Kivity <avi@...hat.com>
To:	Xiao Guangrong <xiaoguangrong@...fujitsu.com>
CC:	Marcelo Tosatti <mtosatti@...hat.com>,
	KVM list <kvm@...r.kernel.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/2] KVM MMU: fix race in invlpg code

On 05/05/2010 03:45 PM, Xiao Guangrong wrote:
>
> Avi Kivity wrote:
>
>    
>>>        spin_lock(&vcpu->kvm->mmu_lock);
>>> +    index = kvm_page_table_hashfn(gfn);
>>> +    bucket =&vcpu->kvm->arch.mmu_page_hash[index];
>>> +    hlist_for_each_entry_safe(s, node, tmp, bucket, hash_link)
>>> +        if (s == sp) {
>>> +            if (s->gfn == gfn&&   s->role.word == role.word)
>>> +                live = true;
>>> +            break;
>>> +        }
>>> +
>>> +    if (!live)
>>> +        goto unlock_exit;
>>> +
>>>
>>>        
>> Did you try the root_count method?  I think it's cleaner.
>>      
> Avi, Thanks for your idea.
>
> I have considered this method, but i'm not sure when it's the good time
> to real free this page, and i think we also need a way to synchronize the
> real free path and this path. Do you have any comment for it :-(
>    

Same as mmu_free_roots():

         --sp->root_count;
         if (!sp->root_count && sp->role.invalid) {
                 kvm_mmu_zap_page(vcpu->kvm, sp);
                 goto unlock_exit;
         }


-- 
error compiling committee.c: too many arguments to function

--
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