public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Jason Wang <jasowang@redhat.com>
To: "Michael S. Tsirkin" <mst@redhat.com>, linux-kernel@vger.kernel.org
Cc: netdev@vger.kernel.org, kvm@vger.kernel.org,
	virtualization@lists.linux-foundation.org
Subject: Re: [PATCH 06/10] vhost: add missing __user annotations
Date: Wed, 7 Dec 2016 12:17:27 +0800	[thread overview]
Message-ID: <cc7652e0-27eb-e4f6-c86b-d00b5fe8bc83@redhat.com> (raw)
In-Reply-To: <1481038106-24899-7-git-send-email-mst@redhat.com>



On 2016年12月06日 23:40, Michael S. Tsirkin wrote:
> Several vhost functions were missing __user annotations
> on pointers, causing sparse warnings. Fix this up.
>
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> ---
>   drivers/vhost/vhost.c | 10 +++++-----
>   1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
> index 7331ef3..ba7db68 100644
> --- a/drivers/vhost/vhost.c
> +++ b/drivers/vhost/vhost.c
> @@ -719,7 +719,7 @@ static int memory_access_ok(struct vhost_dev *d, struct vhost_umem *umem,
>   static int translate_desc(struct vhost_virtqueue *vq, u64 addr, u32 len,
>   			  struct iovec iov[], int iov_size, int access);
>   
> -static int vhost_copy_to_user(struct vhost_virtqueue *vq, void *to,
> +static int vhost_copy_to_user(struct vhost_virtqueue *vq, void __user *to,
>   			      const void *from, unsigned size)
>   {
>   	int ret;
> @@ -749,7 +749,7 @@ static int vhost_copy_to_user(struct vhost_virtqueue *vq, void *to,
>   }
>   
>   static int vhost_copy_from_user(struct vhost_virtqueue *vq, void *to,
> -				void *from, unsigned size)
> +				void __user *from, unsigned size)
>   {
>   	int ret;
>   
> @@ -783,7 +783,7 @@ static int vhost_copy_from_user(struct vhost_virtqueue *vq, void *to,
>   }
>   
>   static void __user *__vhost_get_user(struct vhost_virtqueue *vq,
> -				     void *addr, unsigned size)
> +				     void __user *addr, unsigned size)
>   {
>   	int ret;
>   
> @@ -934,8 +934,8 @@ static int umem_access_ok(u64 uaddr, u64 size, int access)
>   	return 0;
>   }
>   
> -int vhost_process_iotlb_msg(struct vhost_dev *dev,
> -			    struct vhost_iotlb_msg *msg)
> +static int vhost_process_iotlb_msg(struct vhost_dev *dev,
> +				   struct vhost_iotlb_msg *msg)
>   {
>   	int ret = 0;
>   

Patch looks good but this looks like another static conversion not 
__user annotations.
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

  reply	other threads:[~2016-12-07  4:17 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-06 15:40 [PATCH 00/10] virtio: sparse fixes Michael S. Tsirkin
2016-12-06 15:40 ` [PATCH 05/10] vhost: make interval tree static inline Michael S. Tsirkin
2016-12-07  4:16   ` Jason Wang
2016-12-06 15:40 ` [PATCH 06/10] vhost: add missing __user annotations Michael S. Tsirkin
2016-12-07  4:17   ` Jason Wang [this message]
2016-12-06 15:40 ` [PATCH 07/10] vsock/virtio: add a missing __le annotation Michael S. Tsirkin
2016-12-07  4:19   ` Jason Wang
2016-12-07 14:09   ` Stefan Hajnoczi
2016-12-06 15:41 ` [PATCH 08/10] vsock/virtio: mark an internal function static Michael S. Tsirkin
2016-12-07  4:21   ` Jason Wang
2016-12-08 14:25     ` Michael S. Tsirkin
2016-12-12  1:56       ` Jason Wang
2016-12-07 14:09   ` Stefan Hajnoczi
2016-12-06 15:41 ` [PATCH 09/10] vsock/virtio: fix src/dst cid format Michael S. Tsirkin
2016-12-07  4:31   ` Jason Wang
2016-12-11  2:54     ` Michael S. Tsirkin
2016-12-07 14:09   ` Stefan Hajnoczi
2016-12-06 15:41 ` [PATCH 10/10] virtio: enable endian checks for sparse builds Michael S. Tsirkin
2016-12-07  5:27   ` Jason Wang
2016-12-07  6:25   ` Johannes Berg
2016-12-07 13:22     ` Michael S. Tsirkin
2016-12-07  7:30   ` Christoph Hellwig
2016-12-07 14:09   ` Stefan Hajnoczi

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=cc7652e0-27eb-e4f6-c86b-d00b5fe8bc83@redhat.com \
    --to=jasowang@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=virtualization@lists.linux-foundation.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