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: <20101118153240.GE14327@amt.cnet>
Date:	Thu, 18 Nov 2010 13:32:40 -0200
From:	Marcelo Tosatti <mtosatti@...hat.com>
To:	Xiao Guangrong <xiaoguangrong@...fujitsu.com>
Cc:	Avi Kivity <avi@...hat.com>, LKML <linux-kernel@...r.kernel.org>,
	KVM <kvm@...r.kernel.org>
Subject: Re: [PATCH v2 2/6] KVM: MMU: don't drop spte if overwrite it from W
 to RO

On Thu, Nov 18, 2010 at 03:12:56PM +0800, Xiao Guangrong wrote:
> On 11/17/2010 11:57 PM, Avi Kivity wrote:
> 
> >>>   set_pte:
> >>>       update_spte(sptep, spte);
> >>> +    /*
> >>> +     * If we overwrite a writable spte with a read-only one we
> >>> +     * should flush remote TLBs. Otherwise rmap_write_protect
> >>> +     * will find a read-only spte, even though the writable spte
> >>> +     * might be cached on a CPU's TLB.
> >>> +     */
> >>> +    if (is_writable_pte(entry)&&  !is_writable_pte(*sptep))
> >>> +        kvm_flush_remote_tlbs(vcpu->kvm);
> >> There is no need to flush on sync_page path since the guest is
> >> responsible for it.
> >>
> > 
> >  If we don't, the next rmap_write_protect() will incorrectly decide that
> > there's no need to flush tlbs.
> > 
> 
> Maybe it's not a problem if guest can flush all tlbs after overwrite it?
> Marcelo, what's your comment about this?

It can, but there is no guarantee. Your patch is correct.
--
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