From: Paolo Bonzini <pbonzini@redhat.com>
To: Andrew Honig <ahonig@google.com>
Cc: kvm <kvm@vger.kernel.org>
Subject: Re: [PATCH] KVM: Allow userspace to specify memory to be used for private regions.
Date: Wed, 17 Apr 2013 19:07:00 +0200 [thread overview]
Message-ID: <516ED6B4.3020607@redhat.com> (raw)
In-Reply-To: <CAKB9nXu39CcebxaL9tDshKMFHW-wT9cDWMiXD0+9HU3-ECCt9w@mail.gmail.com>
Il 17/04/2013 17:19, Andrew Honig ha scritto:
> Freeing the memory in kvm_arch_free_memslot is as good as anywhere
> else in KVM. The problem is that this memory is in the user space
> process mm. This codepath could be called after the mm is destroyed
> in the case of an process exit without closing the fd, which will
> result in a panic on vm_munmap when it tries to access the mm.
I think that's not a problem, the KVM file descriptor keeps the mm alive.
> There's also the possibility that another process closes the fd and
> messing with that processes memory map seems like it's asking for
> trouble.
You can check that current->mm == kvm->mm and leak the memory if they
don't match.
Paolo
next prev parent reply other threads:[~2013-04-17 17:07 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-15 22:10 [PATCH] KVM: Allow userspace to specify memory to be used for private regions Andrew Honig
2013-04-17 11:42 ` Paolo Bonzini
2013-04-17 15:19 ` Andrew Honig
2013-04-17 17:07 ` Paolo Bonzini [this message]
2013-04-17 13:10 ` Gleb Natapov
2013-04-17 15:24 ` Andrew Honig
2013-04-17 15:30 ` Gleb Natapov
2013-04-17 15:32 ` Andrew Honig
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=516ED6B4.3020607@redhat.com \
--to=pbonzini@redhat.com \
--cc=ahonig@google.com \
--cc=kvm@vger.kernel.org \
/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.