* [PATCH] Don't leak EPT identity page table
@ 2008-04-30 20:16 Anthony Liguori
2008-05-01 8:53 ` Yang, Sheng
2008-05-02 9:29 ` Avi Kivity
0 siblings, 2 replies; 3+ messages in thread
From: Anthony Liguori @ 2008-04-30 20:16 UTC (permalink / raw)
To: kvm-devel; +Cc: Anthony Liguori, Avi Kivity
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);
}
-------------------------------------------------------------------------
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] Don't leak EPT identity page table
2008-04-30 20:16 [PATCH] Don't leak EPT identity page table Anthony Liguori
@ 2008-05-01 8:53 ` Yang, Sheng
2008-05-02 9:29 ` Avi Kivity
1 sibling, 0 replies; 3+ messages in thread
From: Yang, Sheng @ 2008-05-01 8:53 UTC (permalink / raw)
To: Anthony Liguori; +Cc: kvm-devel, Avi Kivity
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Don't leak EPT identity page table
2008-04-30 20:16 [PATCH] Don't leak EPT identity page table Anthony Liguori
2008-05-01 8:53 ` Yang, Sheng
@ 2008-05-02 9:29 ` Avi Kivity
1 sibling, 0 replies; 3+ messages in thread
From: Avi Kivity @ 2008-05-02 9:29 UTC (permalink / raw)
To: Anthony Liguori; +Cc: kvm-devel
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.
>
Applied, thanks.
--
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.
-------------------------------------------------------------------------
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-05-02 9:29 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-30 20:16 [PATCH] Don't leak EPT identity page table Anthony Liguori
2008-05-01 8:53 ` Yang, Sheng
2008-05-02 9:29 ` Avi Kivity
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox