From: Alex Williamson <alex.williamson@redhat.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: avi@redhat.com, kvm@vger.kernel.org,
linux-kernel@vger.kernel.org, jan.kiszka@siemens.com,
cornelia.huck@de.ibm.com
Subject: Re: [PATCH v3 3/3] kvm: Sanitize KVM_IRQFD flags
Date: Mon, 02 Jul 2012 09:49:39 -0600 [thread overview]
Message-ID: <1341244179.1207.447.camel@bling.home> (raw)
In-Reply-To: <20120701082634.GB3906@redhat.com>
On Sun, 2012-07-01 at 11:26 +0300, Michael S. Tsirkin wrote:
> On Fri, Jun 29, 2012 at 09:56:24AM -0600, Alex Williamson wrote:
> > We only know of one so far.
> >
> > Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
>
> BTW should we sanitize padding as well?
I imagine that to make use of a field in the padding we'll set a bit in
the flags to indicate that the field is present/valid. That way we
don't care about garbage in the padding as long as we can sanitize the
flags. Thanks,
Alex
> > ---
> >
> > virt/kvm/eventfd.c | 3 +++
> > 1 file changed, 3 insertions(+)
> >
> > diff --git a/virt/kvm/eventfd.c b/virt/kvm/eventfd.c
> > index c307c24..7d7e2aa 100644
> > --- a/virt/kvm/eventfd.c
> > +++ b/virt/kvm/eventfd.c
> > @@ -340,6 +340,9 @@ kvm_irqfd_deassign(struct kvm *kvm, struct kvm_irqfd *args)
> > int
> > kvm_irqfd(struct kvm *kvm, struct kvm_irqfd *args)
> > {
> > + if (args->flags & ~KVM_IRQFD_FLAG_DEASSIGN)
> > + return -EINVAL;
> > +
> > if (args->flags & KVM_IRQFD_FLAG_DEASSIGN)
> > return kvm_irqfd_deassign(kvm, args);
> >
> >
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at http://vger.kernel.org/majordomo-info.html
> > Please read the FAQ at http://www.tux.org/lkml/
next prev parent reply other threads:[~2012-07-02 15:49 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-29 15:56 [PATCH v3 0/3] kvm: KVM_IRQFD cleanup, docs, sanitize flags Alex Williamson
2012-06-29 15:56 ` [PATCH v3 1/3] kvm: Pass kvm_irqfd to functions Alex Williamson
2012-06-29 15:56 ` [PATCH v3 2/3] kvm: Add missing KVM_IRQFD API documentation Alex Williamson
2012-06-29 15:56 ` [PATCH v3 3/3] kvm: Sanitize KVM_IRQFD flags Alex Williamson
2012-07-01 8:26 ` Michael S. Tsirkin
2012-07-02 15:49 ` Alex Williamson [this message]
2012-07-02 15:51 ` [PATCH v3 0/3] kvm: KVM_IRQFD cleanup, docs, sanitize flags Alex Williamson
2012-07-02 15:52 ` Avi Kivity
2012-07-03 0:10 ` Marcelo Tosatti
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=1341244179.1207.447.camel@bling.home \
--to=alex.williamson@redhat.com \
--cc=avi@redhat.com \
--cc=cornelia.huck@de.ibm.com \
--cc=jan.kiszka@siemens.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mst@redhat.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox