Displaying 20 results from an estimated 34 matches for "vhost_vsock_dev_ioctl".
2018 Mar 14
0
[PATCH] vhost: add vsock compat ioctl
....
>
> Signed-off-by: Sonny Rao <sonnyrao at chromium.org>
I think you need to convert the pointer argument though.
Something along the lines of:
#ifdef CONFIG_COMPAT
static long vhost_vsock_dev_compat_ioctl(struct file *f, unsigned int ioctl,
unsigned long arg)
{
return vhost_vsock_dev_ioctl(f, ioctl, (unsigned long)compat_ptr(arg));
}
#endif
> ---
> drivers/vhost/vsock.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/vhost/vsock.c b/drivers/vhost/vsock.c
> index 0d14e2ff19f16..d0e65e92110e5 100644
> --- a/drivers/vhost/vsock.c
> +++ b/...
2019 Apr 16
4
[PATCH v3 09/26] compat_ioctl: move drivers to compat_ptr_ioctl
...endif
+ .compat_ioctl = compat_ptr_ioctl,
.open = vhost_test_open,
.llseek = noop_llseek,
};
diff --git a/drivers/vhost/vsock.c b/drivers/vhost/vsock.c
index bb5fc0e9fbc2..9a86202678b6 100644
--- a/drivers/vhost/vsock.c
+++ b/drivers/vhost/vsock.c
@@ -716,23 +716,13 @@ static long vhost_vsock_dev_ioctl(struct file *f, unsigned int ioctl,
}
}
-#ifdef CONFIG_COMPAT
-static long vhost_vsock_dev_compat_ioctl(struct file *f, unsigned int ioctl,
- unsigned long arg)
-{
- return vhost_vsock_dev_ioctl(f, ioctl, (unsigned long)compat_ptr(arg));
-}
-#endif
-
static const struct file_operations v...
2019 Apr 16
4
[PATCH v3 09/26] compat_ioctl: move drivers to compat_ptr_ioctl
...endif
+ .compat_ioctl = compat_ptr_ioctl,
.open = vhost_test_open,
.llseek = noop_llseek,
};
diff --git a/drivers/vhost/vsock.c b/drivers/vhost/vsock.c
index bb5fc0e9fbc2..9a86202678b6 100644
--- a/drivers/vhost/vsock.c
+++ b/drivers/vhost/vsock.c
@@ -716,23 +716,13 @@ static long vhost_vsock_dev_ioctl(struct file *f, unsigned int ioctl,
}
}
-#ifdef CONFIG_COMPAT
-static long vhost_vsock_dev_compat_ioctl(struct file *f, unsigned int ioctl,
- unsigned long arg)
-{
- return vhost_vsock_dev_ioctl(f, ioctl, (unsigned long)compat_ptr(arg));
-}
-#endif
-
static const struct file_operations v...
2019 Apr 19
0
[PATCH v3 09/26] compat_ioctl: move drivers to compat_ptr_ioctl
...tl,
> .open = vhost_test_open,
> .llseek = noop_llseek,
> };
> diff --git a/drivers/vhost/vsock.c b/drivers/vhost/vsock.c
> index bb5fc0e9fbc2..9a86202678b6 100644
> --- a/drivers/vhost/vsock.c
> +++ b/drivers/vhost/vsock.c
> @@ -716,23 +716,13 @@ static long vhost_vsock_dev_ioctl(struct file *f, unsigned int ioctl,
> }
> }
>
> -#ifdef CONFIG_COMPAT
> -static long vhost_vsock_dev_compat_ioctl(struct file *f, unsigned int ioctl,
> - unsigned long arg)
> -{
> - return vhost_vsock_dev_ioctl(f, ioctl, (unsigned long)compat_ptr(arg));
> -}
>...
2018 Sep 12
1
[PATCH v2 02/17] compat_ioctl: move drivers to generic_compat_ioctl_ptrarg
...mpat_ioctl = generic_compat_ioctl_ptrarg,
.open = vhost_test_open,
.llseek = noop_llseek,
};
diff --git a/drivers/vhost/vsock.c b/drivers/vhost/vsock.c
index 34bc3ab40c6d..83c60f3a9c09 100644
--- a/drivers/vhost/vsock.c
+++ b/drivers/vhost/vsock.c
@@ -699,23 +699,13 @@ static long vhost_vsock_dev_ioctl(struct file *f, unsigned int ioctl,
}
}
-#ifdef CONFIG_COMPAT
-static long vhost_vsock_dev_compat_ioctl(struct file *f, unsigned int ioctl,
- unsigned long arg)
-{
- return vhost_vsock_dev_ioctl(f, ioctl, (unsigned long)compat_ptr(arg));
-}
-#endif
-
static const struct file_operations v...
2013 Jun 27
2
[RFC 4/5] VSOCK: Introduce vhost-vsock.ko
...ct vhost_vsock *vsock, u32 guest_cid)
> +{
> + mutex_lock(&vhost_vsock_mutex);
> + vsock->guest_cid = guest_cid;
> + pr_debug("%s:guest_cid=%d\n", __func__, guest_cid);
> + mutex_unlock(&vhost_vsock_mutex);
> +
> + return 0;
> +}
> +
> +static long vhost_vsock_dev_ioctl(struct file *f, unsigned int ioctl,
> + unsigned long arg)
> +{
> + struct vhost_vsock *vsock = f->private_data;
> + void __user *argp = (void __user *)arg;
> + u64 __user *featurep = argp;
> + u32 __user *cidp = argp;
> + u32 guest_cid;
> + u64 features;
> + int...
2013 Jun 27
2
[RFC 4/5] VSOCK: Introduce vhost-vsock.ko
...ct vhost_vsock *vsock, u32 guest_cid)
> +{
> + mutex_lock(&vhost_vsock_mutex);
> + vsock->guest_cid = guest_cid;
> + pr_debug("%s:guest_cid=%d\n", __func__, guest_cid);
> + mutex_unlock(&vhost_vsock_mutex);
> +
> + return 0;
> +}
> +
> +static long vhost_vsock_dev_ioctl(struct file *f, unsigned int ioctl,
> + unsigned long arg)
> +{
> + struct vhost_vsock *vsock = f->private_data;
> + void __user *argp = (void __user *)arg;
> + u64 __user *featurep = argp;
> + u32 __user *cidp = argp;
> + u32 guest_cid;
> + u64 features;
> + int...
2019 Jul 30
2
[PATCH v5 12/29] compat_ioctl: move drivers to compat_ptr_ioctl
...endif
+ .compat_ioctl = compat_ptr_ioctl,
.open = vhost_test_open,
.llseek = noop_llseek,
};
diff --git a/drivers/vhost/vsock.c b/drivers/vhost/vsock.c
index 6a50e1d0529c..69c0350f622e 100644
--- a/drivers/vhost/vsock.c
+++ b/drivers/vhost/vsock.c
@@ -729,23 +729,13 @@ static long vhost_vsock_dev_ioctl(struct file *f, unsigned int ioctl,
}
}
-#ifdef CONFIG_COMPAT
-static long vhost_vsock_dev_compat_ioctl(struct file *f, unsigned int ioctl,
- unsigned long arg)
-{
- return vhost_vsock_dev_ioctl(f, ioctl, (unsigned long)compat_ptr(arg));
-}
-#endif
-
static const struct file_operations v...
2013 Jun 27
0
[RFC 4/5] VSOCK: Introduce vhost-vsock.ko
...eturn 0;
+}
+
+static int vhost_vsock_set_cid(struct vhost_vsock *vsock, u32 guest_cid)
+{
+ mutex_lock(&vhost_vsock_mutex);
+ vsock->guest_cid = guest_cid;
+ pr_debug("%s:guest_cid=%d\n", __func__, guest_cid);
+ mutex_unlock(&vhost_vsock_mutex);
+
+ return 0;
+}
+
+static long vhost_vsock_dev_ioctl(struct file *f, unsigned int ioctl,
+ unsigned long arg)
+{
+ struct vhost_vsock *vsock = f->private_data;
+ void __user *argp = (void __user *)arg;
+ u64 __user *featurep = argp;
+ u32 __user *cidp = argp;
+ u32 guest_cid;
+ u64 features;
+ int r;
+
+ switch (ioctl) {
+ case VHOST_VSOCK_SE...
2015 Dec 09
0
[PATCH v3 3/4] VSOCK: Introduce vhost-vsock.ko
...>dev.mutex);
+ return -EFAULT;
+ }
+
+ for (i = 0; i < VSOCK_VQ_MAX; i++) {
+ vq = &vsock->vqs[i].vq;
+ mutex_lock(&vq->mutex);
+ vq->acked_features = features;
+ mutex_unlock(&vq->mutex);
+ }
+ mutex_unlock(&vsock->dev.mutex);
+ return 0;
+}
+
+static long vhost_vsock_dev_ioctl(struct file *f, unsigned int ioctl,
+ unsigned long arg)
+{
+ struct vhost_vsock *vsock = f->private_data;
+ void __user *argp = (void __user *)arg;
+ u64 __user *featurep = argp;
+ u32 __user *cidp = argp;
+ u32 guest_cid;
+ u64 features;
+ int r;
+
+ switch (ioctl) {
+ case VHOST_VSOCK_SE...
2015 Dec 11
1
[PATCH v3 3/4] VSOCK: Introduce vhost-vsock.ko
...q;
> + mutex_lock(&vq->mutex);
> + vq->acked_features = features;
Is this a user supplied flag? Should it be masked to valid values?
> + mutex_unlock(&vq->mutex);
> + }
> + mutex_unlock(&vsock->dev.mutex);
> + return 0;
> +}
> +
> +static long vhost_vsock_dev_ioctl(struct file *f, unsigned int ioctl,
> + unsigned long arg)
> +{
> + struct vhost_vsock *vsock = f->private_data;
> + void __user *argp = (void __user *)arg;
> + u64 __user *featurep = argp;
> + u32 __user *cidp = argp;
> + u32 guest_cid;
> + u64 features;
> + int...
2015 Dec 11
1
[PATCH v3 3/4] VSOCK: Introduce vhost-vsock.ko
...q;
> + mutex_lock(&vq->mutex);
> + vq->acked_features = features;
Is this a user supplied flag? Should it be masked to valid values?
> + mutex_unlock(&vq->mutex);
> + }
> + mutex_unlock(&vsock->dev.mutex);
> + return 0;
> +}
> +
> +static long vhost_vsock_dev_ioctl(struct file *f, unsigned int ioctl,
> + unsigned long arg)
> +{
> + struct vhost_vsock *vsock = f->private_data;
> + void __user *argp = (void __user *)arg;
> + u64 __user *featurep = argp;
> + u32 __user *cidp = argp;
> + u32 guest_cid;
> + u64 features;
> + int...
2018 Apr 09
2
kernel BUG at drivers/vhost/vhost.c:LINE! (2)
...00000000000
> DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
> Call Trace:
> vhost_update_used_flags+0x3af/0x4a0 drivers/vhost/vhost.c:1723
> vhost_vq_init_access+0x117/0x590 drivers/vhost/vhost.c:1763
> vhost_vsock_start drivers/vhost/vsock.c:446 [inline]
> vhost_vsock_dev_ioctl+0x751/0x920 drivers/vhost/vsock.c:678
> vfs_ioctl fs/ioctl.c:46 [inline]
> file_ioctl fs/ioctl.c:500 [inline]
> do_vfs_ioctl+0x1cf/0x1650 fs/ioctl.c:684
> ksys_ioctl+0xa9/0xd0 fs/ioctl.c:701
> SYSC_ioctl fs/ioctl.c:708 [inline]
> SyS_ioctl+0x24/0x30 fs/ioctl.c:706
> do_s...
2018 Apr 09
2
kernel BUG at drivers/vhost/vhost.c:LINE! (2)
...00000000000
> DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
> Call Trace:
> vhost_update_used_flags+0x3af/0x4a0 drivers/vhost/vhost.c:1723
> vhost_vq_init_access+0x117/0x590 drivers/vhost/vhost.c:1763
> vhost_vsock_start drivers/vhost/vsock.c:446 [inline]
> vhost_vsock_dev_ioctl+0x751/0x920 drivers/vhost/vsock.c:678
> vfs_ioctl fs/ioctl.c:46 [inline]
> file_ioctl fs/ioctl.c:500 [inline]
> do_vfs_ioctl+0x1cf/0x1650 fs/ioctl.c:684
> ksys_ioctl+0xa9/0xd0 fs/ioctl.c:701
> SYSC_ioctl fs/ioctl.c:708 [inline]
> SyS_ioctl+0x24/0x30 fs/ioctl.c:706
> do_s...
2015 Dec 09
9
[PATCH v3 0/4] Add virtio transport for AF_VSOCK
Note: the virtio-vsock device specification is currently under review but not
yet finalized. Please review this code but don't merge until I send an update
when the spec is finalized. Thanks!
v3:
* Remove unnecessary 3-way handshake, just do REQUEST/RESPONSE instead
of REQUEST/RESPONSE/ACK
* Remove SOCK_DGRAM support and focus on SOCK_STREAM first
(also drop v2 Patch 1, it's
2015 Dec 09
9
[PATCH v3 0/4] Add virtio transport for AF_VSOCK
Note: the virtio-vsock device specification is currently under review but not
yet finalized. Please review this code but don't merge until I send an update
when the spec is finalized. Thanks!
v3:
* Remove unnecessary 3-way handshake, just do REQUEST/RESPONSE instead
of REQUEST/RESPONSE/ACK
* Remove SOCK_DGRAM support and focus on SOCK_STREAM first
(also drop v2 Patch 1, it's
2013 Jun 27
13
[RFC 0/5] Introduce VM Sockets virtio transport
Hello guys,
In commit d021c344051af91 (VSOCK: Introduce VM Sockets), VMware added VM
Sockets support. VM Sockets allows communication between virtual
machines and the hypervisor. VM Sockets is able to use different
hyervisor neutral transport to transfer data. Currently, only VMware
VMCI transport is supported.
This series introduces virtio transport for VM Sockets.
Any comments are
2013 Jun 27
13
[RFC 0/5] Introduce VM Sockets virtio transport
Hello guys,
In commit d021c344051af91 (VSOCK: Introduce VM Sockets), VMware added VM
Sockets support. VM Sockets allows communication between virtual
machines and the hypervisor. VM Sockets is able to use different
hyervisor neutral transport to transfer data. Currently, only VMware
VMCI transport is supported.
This series introduces virtio transport for VM Sockets.
Any comments are
2015 Dec 09
1
[PATCH v2] Revert "Merge branch 'vsock-virtio'"
...>dev.mutex);
- return -EFAULT;
- }
-
- for (i = 0; i < VSOCK_VQ_MAX; i++) {
- vq = &vsock->vqs[i].vq;
- mutex_lock(&vq->mutex);
- vq->acked_features = features;
- mutex_unlock(&vq->mutex);
- }
- mutex_unlock(&vsock->dev.mutex);
- return 0;
-}
-
-static long vhost_vsock_dev_ioctl(struct file *f, unsigned int ioctl,
- unsigned long arg)
-{
- struct vhost_vsock *vsock = f->private_data;
- void __user *argp = (void __user *)arg;
- u64 __user *featurep = argp;
- u32 __user *cidp = argp;
- u32 guest_cid;
- u64 features;
- int r;
-
- switch (ioctl) {
- case VHOST_VSOCK_SE...
2015 Dec 09
1
[PATCH v2] Revert "Merge branch 'vsock-virtio'"
...>dev.mutex);
- return -EFAULT;
- }
-
- for (i = 0; i < VSOCK_VQ_MAX; i++) {
- vq = &vsock->vqs[i].vq;
- mutex_lock(&vq->mutex);
- vq->acked_features = features;
- mutex_unlock(&vq->mutex);
- }
- mutex_unlock(&vsock->dev.mutex);
- return 0;
-}
-
-static long vhost_vsock_dev_ioctl(struct file *f, unsigned int ioctl,
- unsigned long arg)
-{
- struct vhost_vsock *vsock = f->private_data;
- void __user *argp = (void __user *)arg;
- u64 __user *featurep = argp;
- u32 __user *cidp = argp;
- u32 guest_cid;
- u64 features;
- int r;
-
- switch (ioctl) {
- case VHOST_VSOCK_SE...