lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <cc7652e0-27eb-e4f6-c86b-d00b5fe8bc83@redhat.com>
Date:   Wed, 7 Dec 2016 12:17:27 +0800
From:   Jason Wang <jasowang@...hat.com>
To:     "Michael S. Tsirkin" <mst@...hat.com>, linux-kernel@...r.kernel.org
Cc:     kvm@...r.kernel.org, virtualization@...ts.linux-foundation.org,
        netdev@...r.kernel.org
Subject: Re: [PATCH 06/10] vhost: add missing __user annotations



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@...hat.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.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ