All of lore.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Alexander Graf <agraf@suse.de>, KVM list <kvm@vger.kernel.org>,
	kvm-ppc@vger.kernel.org
Subject: Re: [PATCH] KVM: Add compat ioctl for KVM_SET_SIGNAL_MASK
Date: Sun, 19 Jun 2011 13:37:08 +0000	[thread overview]
Message-ID: <4DFDFB84.3090903@redhat.com> (raw)
In-Reply-To: <4DF0ED75.3040500@redhat.com>

On 06/09/2011 06:57 PM, Paolo Bonzini wrote:
>
> -------------------------- 8< -----------------------------
> From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
> From: Paolo Bonzini <pbonzini@redhat.com>
> Date: Thu, 9 Jun 2011 17:48:50 +0200
> Subject: [PATCH] KVM: fix documentation for KVM_SET_SIGNAL_MASK
>
> The signal mask passed to KVM_SET_SIGNAL_MASK needs to be ABI-compatible
> with sigprocmask, so that functions operating on sigset_t can be used
> with it.  Referring to the signal mask as an array of bytes is incorrect
> on big endian systems, fix it.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  Documentation/kvm/api.txt |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/Documentation/kvm/api.txt b/Documentation/kvm/api.txt
> index 9bef4e4..ec15972 100644
> --- a/Documentation/kvm/api.txt
> +++ b/Documentation/kvm/api.txt
> @@ -464,8 +464,8 @@ signal mask.
>
>  /* for KVM_SET_SIGNAL_MASK */
>  struct kvm_signal_mask {
> -    __u32 len;
> -    __u8  sigset[0];
> +    __u32          len;
> +    unsigned long  sigset[0];
>  };

But that doesn't match the definition in kvm.h.  If someone sets 
kvm_signal_mask::sigset[3], they'll get different answers if they look 
at the documentation or the code.

So it needs to be documented in English, not C.

(and not whitespace-damaged, either)

-- 
error compiling committee.c: too many arguments to function


WARNING: multiple messages have this Message-ID (diff)
From: Avi Kivity <avi@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Alexander Graf <agraf@suse.de>, KVM list <kvm@vger.kernel.org>,
	kvm-ppc@vger.kernel.org
Subject: Re: [PATCH] KVM: Add compat ioctl for KVM_SET_SIGNAL_MASK
Date: Sun, 19 Jun 2011 16:37:08 +0300	[thread overview]
Message-ID: <4DFDFB84.3090903@redhat.com> (raw)
In-Reply-To: <4DF0ED75.3040500@redhat.com>

On 06/09/2011 06:57 PM, Paolo Bonzini wrote:
>
> -------------------------- 8< -----------------------------
> From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
> From: Paolo Bonzini <pbonzini@redhat.com>
> Date: Thu, 9 Jun 2011 17:48:50 +0200
> Subject: [PATCH] KVM: fix documentation for KVM_SET_SIGNAL_MASK
>
> The signal mask passed to KVM_SET_SIGNAL_MASK needs to be ABI-compatible
> with sigprocmask, so that functions operating on sigset_t can be used
> with it.  Referring to the signal mask as an array of bytes is incorrect
> on big endian systems, fix it.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  Documentation/kvm/api.txt |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/Documentation/kvm/api.txt b/Documentation/kvm/api.txt
> index 9bef4e4..ec15972 100644
> --- a/Documentation/kvm/api.txt
> +++ b/Documentation/kvm/api.txt
> @@ -464,8 +464,8 @@ signal mask.
>
>  /* for KVM_SET_SIGNAL_MASK */
>  struct kvm_signal_mask {
> -    __u32 len;
> -    __u8  sigset[0];
> +    __u32          len;
> +    unsigned long  sigset[0];
>  };

But that doesn't match the definition in kvm.h.  If someone sets 
kvm_signal_mask::sigset[3], they'll get different answers if they look 
at the documentation or the code.

So it needs to be documented in English, not C.

(and not whitespace-damaged, either)

-- 
error compiling committee.c: too many arguments to function


  reply	other threads:[~2011-06-19 13:37 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-07 20:25 [PATCH] KVM: Add compat ioctl for KVM_SET_SIGNAL_MASK Alexander Graf
2011-06-07 20:25 ` Alexander Graf
2011-06-07 20:52 ` Arnd Bergmann
2011-06-07 20:52   ` Arnd Bergmann
2011-06-08  0:45 ` Alexander Graf
2011-06-08  0:45   ` Alexander Graf
2011-06-09 12:24   ` Avi Kivity
2011-06-09 12:24     ` Avi Kivity
2011-06-09 15:57     ` Paolo Bonzini
2011-06-09 15:57       ` Paolo Bonzini
2011-06-19 13:37       ` Avi Kivity [this message]
2011-06-19 13:37         ` 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=4DFDFB84.3090903@redhat.com \
    --to=avi@redhat.com \
    --cc=agraf@suse.de \
    --cc=kvm-ppc@vger.kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=pbonzini@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 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.