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]
Message-ID: <4CE0FDBC.20505@redhat.com>
Date:	Mon, 15 Nov 2010 11:30:36 +0200
From:	Avi Kivity <avi@...hat.com>
To:	Xiao Guangrong <xiaoguangrong@...fujitsu.com>
CC:	Marcelo Tosatti <mtosatti@...hat.com>,
	Gleb Natapov <gleb@...hat.com>,
	LKML <linux-kernel@...r.kernel.org>, KVM <kvm@...r.kernel.org>
Subject: Re: [PATCH v2 5/5] KVM: MMU: retry #PF for softmmu

On 11/15/2010 07:25 AM, Xiao Guangrong wrote:
> On 11/14/2010 06:46 PM, Avi Kivity wrote:
> >  On 11/12/2010 08:50 AM, Xiao Guangrong wrote:
> >>  Retry #PF for softmmu only when the current vcpu has the same
> >>  root shadow page as the time when #PF occurs. it means they
> >>  have same paging environment
> >>
> >
>
> Hi Avi,
>
> Thanks for your review.
>
> >  The process could have been killed and replaced by another using the
> >  same cr3.
>
> Yeah, this 'retry' is unnecessary if the process is killed, but this
> case is infrequent, the most case is the process keeps running and try
> to access the fault address later.

The problem is that if we retry in this case, we install an incorrect spte?

> And, we can get few advantages even if the process have been killed,
> since we can fix the page mapping for the other processes which have
> the same CR3, if other process accessed the fault address, the #PF
> can be avoid. (of course we can't speculate other process can access
> the fault address later)
>
> After all, this is a speculate path, i thinks it can work well in most
> case. :-)
>
> >  Or we may be running a guest that uses the same cr3 for all
> >  processes.
>
> We can allow to retry #PF in the same CR3 even if there are the different
> processes, since these processes have the same page mapping, the later #PF
> can avoid if the page mapping have been fixed.

The guest may have changed page directories or other levels.

> >  Or another thread may have mmap()ed something else over the
> >  same address.
>
> The mmap virtual address is also visible for other threads since the threads
> have the same page table, so i think this case is the same as above?

Again, don't we install the wrong spte in this case?

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