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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Tue, 26 Jun 2012 14:42:26 +0300
From:	"Michael S. Tsirkin" <mst@...hat.com>
To:	Christian Borntraeger <borntraeger@...ibm.com>
Cc:	kvm@...r.kernel.org, netdev@...r.kernel.org,
	Jens Freimann <jfrei@...ux.vnet.ibm.com>
Subject: Re: [PATCH 1/1] use USER_DS in vhost_worker thread

On Tue, Jun 26, 2012 at 12:59:58PM +0200, Christian Borntraeger wrote:
> From: Jens Freimann <jfrei@...ux.vnet.ibm.com>
> 
> On some architectures address spaces are set up in a way that this is
> not necessary to work properly but on some others (like s390) it is.
> Make sure we operate on the user address space to allow copy_xxx_user()
> from the vhost_worker() thread by setting it explicitly before calling
> use_mm() and revert it after unuse_mm().
> 
> Signed-off-by: Jens Freimann <jfrei@...ux.vnet.ibm.com>
> Signed-off-by: Christian Borntraeger <borntraeger@...ibm.com>

Acked-by: Michael S. Tsirkin <mst@...hat.com>

Dave, can you queue this up for 3.5 please?

Thanks.

> ---
>  drivers/vhost/vhost.c |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
> index 94dbd25..112156f 100644
> --- a/drivers/vhost/vhost.c
> +++ b/drivers/vhost/vhost.c
> @@ -191,7 +191,9 @@ static int vhost_worker(void *data)
>  	struct vhost_dev *dev = data;
>  	struct vhost_work *work = NULL;
>  	unsigned uninitialized_var(seq);
> +	mm_segment_t oldfs = get_fs();
>  
> +	set_fs(USER_DS);
>  	use_mm(dev->mm);
>  
>  	for (;;) {
> @@ -229,6 +231,7 @@ static int vhost_worker(void *data)
>  
>  	}
>  	unuse_mm(dev->mm);
> +	set_fs(oldfs);
>  	return 0;
>  }
>  
> -- 
> 1.7.0.4
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ