public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Alex Williamson <alex.williamson@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: Sun, 1 Jul 2012 11:26:34 +0300	[thread overview]
Message-ID: <20120701082634.GB3906@redhat.com> (raw)
In-Reply-To: <20120629155622.30535.24831.stgit@bling.home>

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?

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

  reply	other threads:[~2012-07-01  8:26 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 [this message]
2012-07-02 15:49     ` Alex Williamson
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=20120701082634.GB3906@redhat.com \
    --to=mst@redhat.com \
    --cc=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 \
    /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