All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Yang, Sheng" <sheng.yang@intel.com>
To: Anthony Liguori <aliguori@us.ibm.com>
Cc: kvm-devel@lists.sourceforge.net, Avi Kivity <avi@qumranet.com>
Subject: Re: [PATCH] Don't leak EPT identity page table
Date: Thu, 1 May 2008 16:53:16 +0800	[thread overview]
Message-ID: <200805011653.17405.sheng.yang@intel.com> (raw)
In-Reply-To: <1209586565-913-1-git-send-email-aliguori@us.ibm.com>

On Thursday 01 May 2008 04:16:05 Anthony Liguori wrote:
> In vmx.c:alloc_identity_pagetable() we grab a reference to the EPT identity
> page table via gfn_to_page().  We never release this reference though.
>
> This patch releases the reference to this page on VM destruction.  I
> haven't tested this with EPT.
>
> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
>
> diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
> index 578a0c1..63f46cf 100644
> --- a/arch/x86/kvm/x86.c
> +++ b/arch/x86/kvm/x86.c
> @@ -3909,6 +3909,8 @@ void kvm_arch_destroy_vm(struct kvm *kvm)
>  	kvm_free_physmem(kvm);
>  	if (kvm->arch.apic_access_page)
>  		put_page(kvm->arch.apic_access_page);
> +	if (kvm->arch.ept_identity_pagetable)
> +		put_page(kvm->arch.ept_identity_pagetable);
>  	kfree(kvm);
>  }

Um... I neglected that...Thanks for point it out!

-- 
Thanks
Yang, Sheng

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone

  reply	other threads:[~2008-05-01  8:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-30 20:16 [PATCH] Don't leak EPT identity page table Anthony Liguori
2008-05-01  8:53 ` Yang, Sheng [this message]
2008-05-02  9:29 ` Avi Kivity

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200805011653.17405.sheng.yang@intel.com \
    --to=sheng.yang@intel.com \
    --cc=aliguori@us.ibm.com \
    --cc=avi@qumranet.com \
    --cc=kvm-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.