Skip to contentSkip to conversation

vhost: fix VHOST_GET_BACKEND_FEATURES ioctl request definition

PATCH Applied Gleb Fotengauer-Malinovskiy 4 participants 8 messages Sep 3, 2018 – Sep 4, 2018

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 vhost: fix VHOST_GET_BACKEND_FEATURES ioctl request definition

The _IOC_READ flag fits this ioctl request more because this request actually only writes to, but doesn't read from userspace. See NOTEs in include/uapi/asm-generic/ioctl.h for more information.

Fixes 429711aec282 ("vhost: switch to use new message format")
---
 include/uapi/linux/vhost.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/uapi/linux/vhost.h +1 -1
index b1e22c40c4b6..84c3de89696a 100644
@@ -176,7 +176,7 @@ struct vhost_memory {
 #define VHOST_BACKEND_F_IOTLB_MSG_V2 0x1
 
 #define VHOST_SET_BACKEND_FEATURES _IOW(VHOST_VIRTIO, 0x25, __u64)
-#define VHOST_GET_BACKEND_FEATURES _IOW(VHOST_VIRTIO, 0x26, __u64)
+#define VHOST_GET_BACKEND_FEATURES _IOR(VHOST_VIRTIO, 0x26, __u64)
 
 /* VHOST_NET specific defines */
 
Signature · 1 line
glebfm
#1 lore raw
Quoted 6 lines · Gleb Fotengauer-Malinovskiy

The _IOC_READ flag fits this ioctl request more because this request actually only writes to, but doesn't read from userspace. See NOTEs in include/uapi/asm-generic/ioctl.h for more information.

Fixes 429711aec282 ("vhost: switch to use new message format")

Hmm it does make sense, and it's not too late to fix this up. Jason, what's your take on this? Was _IOW intentional?

Quoted 20 lines
---
 include/uapi/linux/vhost.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/uapi/linux/vhost.h +1 -1
index b1e22c40c4b6..84c3de89696a 100644
@@ -176,7 +176,7 @@ struct vhost_memory {
 #define VHOST_BACKEND_F_IOTLB_MSG_V2 0x1
 
 #define VHOST_SET_BACKEND_FEATURES _IOW(VHOST_VIRTIO, 0x25, __u64)
-#define VHOST_GET_BACKEND_FEATURES _IOW(VHOST_VIRTIO, 0x26, __u64)
+#define VHOST_GET_BACKEND_FEATURES _IOR(VHOST_VIRTIO, 0x26, __u64)
 
 /* VHOST_NET specific defines */
 
Signature · 2 lines
-- 
glebfm
Acked-by
#2 lore raw
Quoted 9 lines · Michael S. Tsirkin
Quoted 6 lines · Gleb Fotengauer-Malinovskiy

The _IOC_READ flag fits this ioctl request more because this request actually only writes to, but doesn't read from userspace. See NOTEs in include/uapi/asm-generic/ioctl.h for more information.

Fixes 429711aec282 ("vhost: switch to use new message format")

Hmm it does make sense, and it's not too late to fix this up. Jason, what's your take on this? Was _IOW intentional?

My bad, not intentional. And I agree that fixing this is not too late.

So

Quoted 21 lines
Quoted 21 lines
---
  include/uapi/linux/vhost.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
include/uapi/linux/vhost.h +1 -1
index b1e22c40c4b6..84c3de89696a 100644
@@ -176,7 +176,7 @@ struct vhost_memory {
  #define VHOST_BACKEND_F_IOTLB_MSG_V2 0x1
 
  #define VHOST_SET_BACKEND_FEATURES _IOW(VHOST_VIRTIO, 0x25, __u64)
-#define VHOST_GET_BACKEND_FEATURES _IOW(VHOST_VIRTIO, 0x26, __u64)
+#define VHOST_GET_BACKEND_FEATURES _IOR(VHOST_VIRTIO, 0x26, __u64)
 
  /* VHOST_NET specific defines */
 
Signature · 2 lines
-- 
glebfm
maintainer Acked-by
#3 lore raw
Quoted 10 lines · Jason Wang
Quoted 7 lines · Michael S. Tsirkin
Quoted 6 lines · Gleb Fotengauer-Malinovskiy

The _IOC_READ flag fits this ioctl request more because this request actually only writes to, but doesn't read from userspace. See NOTEs in include/uapi/asm-generic/ioctl.h for more information.

Fixes 429711aec282 ("vhost: switch to use new message format")
Quoted 8 lines
Quoted 2 lines

Hmm it does make sense, and it's not too late to fix this up. Jason, what's your take on this? Was _IOW intentional?

My bad, not intentional. And I agree that fixing this is not too late.

So

OK then

Quoted 18 lines
Quoted 18 lines
Quoted 18 lines
---
  include/uapi/linux/vhost.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
include/uapi/linux/vhost.h +1 -2
index b1e22c40c4b6..84c3de89696a 100644
@@ -176,7 +176,7 @@ struct vhost_memory {
  #define VHOST_BACKEND_F_IOTLB_MSG_V2 0x1
  #define VHOST_SET_BACKEND_FEATURES _IOW(VHOST_VIRTIO, 0x25, __u64)
-#define VHOST_GET_BACKEND_FEATURES _IOW(VHOST_VIRTIO, 0x26, __u64)
+#define VHOST_GET_BACKEND_FEATURES _IOR(VHOST_VIRTIO, 0x26, __u64)
  /* VHOST_NET specific defines */
 
-- 

glebfm

maintainer Applied
#4 lore raw

From: "Michael S. Tsirkin" <[email protected]>
Date: Mon, 3 Sep 2018 23:11:11 -0400

Quoted 16 lines · Jason Wang
Quoted 15 lines · Michael S. Tsirkin
Quoted 9 lines · Gleb Fotengauer-Malinovskiy
Quoted 6 lines

The _IOC_READ flag fits this ioctl request more because this request actually only writes to, but doesn't read from userspace. See NOTEs in include/uapi/asm-generic/ioctl.h for more information.

Fixes 429711aec282 ("vhost: switch to use new message format")

Hmm it does make sense, and it's not too late to fix this up. Jason, what's your take on this? Was _IOW intentional?

My bad, not intentional. And I agree that fixing this is not too late.

Quoted 8 lines
Quoted 3 lines

So

OK then

Applied, thanks everyone.

maintainer Applied
#5 lore raw
In reply to Michael S. Tsirkin

From: "Michael S. Tsirkin" <[email protected]>
Date: Mon, 3 Sep 2018 23:11:11 -0400

Quoted 16 lines · Jason Wang
Quoted 15 lines · Michael S. Tsirkin
Quoted 9 lines · Gleb Fotengauer-Malinovskiy
Quoted 6 lines

The _IOC_READ flag fits this ioctl request more because this request actually only writes to, but doesn't read from userspace. See NOTEs in include/uapi/asm-generic/ioctl.h for more information.

Fixes 429711aec282 ("vhost: switch to use new message format")

Hmm it does make sense, and it's not too late to fix this up. Jason, what's your take on this? Was _IOW intentional?

My bad, not intentional. And I agree that fixing this is not too late.

Quoted 8 lines
Quoted 3 lines

So

OK then

Applied, thanks everyone.

maintainer Acked-by
#6 lore raw
In reply to Jason Wang
Quoted 10 lines · Jason Wang
Quoted 7 lines · Michael S. Tsirkin
Quoted 6 lines · Gleb Fotengauer-Malinovskiy

The _IOC_READ flag fits this ioctl request more because this request actually only writes to, but doesn't read from userspace. See NOTEs in include/uapi/asm-generic/ioctl.h for more information.

Fixes 429711aec282 ("vhost: switch to use new message format")
Quoted 8 lines
Quoted 2 lines

Hmm it does make sense, and it's not too late to fix this up. Jason, what's your take on this? Was _IOW intentional?

My bad, not intentional. And I agree that fixing this is not too late.

So

OK then

Quoted 16 lines
Quoted 16 lines
Quoted 16 lines
---
  include/uapi/linux/vhost.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
include/uapi/linux/vhost.h +1 -1
index b1e22c40c4b6..84c3de89696a 100644
@@ -176,7 +176,7 @@ struct vhost_memory {
  #define VHOST_BACKEND_F_IOTLB_MSG_V2 0x1
  #define VHOST_SET_BACKEND_FEATURES _IOW(VHOST_VIRTIO, 0x25, __u64)
-#define VHOST_GET_BACKEND_FEATURES _IOW(VHOST_VIRTIO, 0x26, __u64)
+#define VHOST_GET_BACKEND_FEATURES _IOR(VHOST_VIRTIO, 0x26, __u64)
  /* VHOST_NET specific defines */
 
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
include/uapi/linux/vhost.h +0 -1
-- 

glebfm

_______________________________________________
Virtualization mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

Acked-by
#7 lore raw
In reply to Michael S. Tsirkin
Quoted 9 lines · Michael S. Tsirkin
Quoted 6 lines · Gleb Fotengauer-Malinovskiy

The _IOC_READ flag fits this ioctl request more because this request actually only writes to, but doesn't read from userspace. See NOTEs in include/uapi/asm-generic/ioctl.h for more information.

Fixes 429711aec282 ("vhost: switch to use new message format")

Hmm it does make sense, and it's not too late to fix this up. Jason, what's your take on this? Was _IOW intentional?

My bad, not intentional. And I agree that fixing this is not too late.

So

Quoted 16 lines
Quoted 16 lines
---
  include/uapi/linux/vhost.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
include/uapi/linux/vhost.h +1 -1
index b1e22c40c4b6..84c3de89696a 100644
@@ -176,7 +176,7 @@ struct vhost_memory {
  #define VHOST_BACKEND_F_IOTLB_MSG_V2 0x1
 
  #define VHOST_SET_BACKEND_FEATURES _IOW(VHOST_VIRTIO, 0x25, __u64)
-#define VHOST_GET_BACKEND_FEATURES _IOW(VHOST_VIRTIO, 0x26, __u64)
+#define VHOST_GET_BACKEND_FEATURES _IOR(VHOST_VIRTIO, 0x26, __u64)
 
Quoted 5 lines
Quoted 5 lines
include/uapi/linux/vhost.h +0 -0
  /* VHOST_NET specific defines */
 
Signature · 2 lines
-- 
glebfm

_______________________________________________
Virtualization mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/virtualization