Skip to contentSkip to conversation

hyper-v: Remove internal types from UAPI header

PATCH In review Andy Shevchenko 2 participants 4 messages Apr 22, 2020

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

PATCH 1/1 hyper-v: Remove internal types from UAPI header

The uuid_le mistakenly comes to be an UAPI type. Since it's luckily not used by Hyper-V APIs, we may replace with POD types, i.e. __u8 array.

Note, previously shared uuid_be had been removed from UAPI few releases ago. This is a continuation of that process towards removing uuid_le one.

Note, there is no ABI change!

---
 include/uapi/linux/hyperv.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
include/uapi/linux/hyperv.h +2 -2
index 991b2b7ada7a3..8f24404ad04f1 100644
@@ -119,8 +119,8 @@ enum hv_fcopy_op {
 
 struct hv_fcopy_hdr {
 	__u32 operation;
-	uuid_le service_id0; /* currently unused */
-	uuid_le service_id1; /* currently unused */
+	__u8 service_id0[16]; /* currently unused */
+	__u8 service_id1[16]; /* currently unused */
 } __attribute__((packed));
 
 #define OVER_WRITE	0x1
Signature · 1 line
2.26.1
maintainer
#1 lore raw
Quoted 9 lines · Andy Shevchenko

The uuid_le mistakenly comes to be an UAPI type. Since it's luckily not used by Hyper-V APIs, we may replace with POD types, i.e. __u8 array.

Note, previously shared uuid_be had been removed from UAPI few releases ago. This is a continuation of that process towards removing uuid_le one.

Note, there is no ABI change!

Can you clarify why guid_t is not used instead? Is the plan to remove it from UAPI as well?

Wei.

Quoted 22 lines
---
 include/uapi/linux/hyperv.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
include/uapi/linux/hyperv.h +2 -2
index 991b2b7ada7a3..8f24404ad04f1 100644
@@ -119,8 +119,8 @@ enum hv_fcopy_op {
 
 struct hv_fcopy_hdr {
 	__u32 operation;
-	uuid_le service_id0; /* currently unused */
-	uuid_le service_id1; /* currently unused */
+	__u8 service_id0[16]; /* currently unused */
+	__u8 service_id1[16]; /* currently unused */
 } __attribute__((packed));
 
 #define OVER_WRITE	0x1
Signature · 1 line
2.26.1
#2 lore raw
Quoted 4 lines · Wei Liu
Quoted 3 lines · Andy Shevchenko

The uuid_le mistakenly comes to be an UAPI type. Since it's luckily not used by Hyper-V APIs, we may replace with POD types, i.e. __u8 array.

Quoted 8 lines
Quoted 6 lines

Note, previously shared uuid_be had been removed from UAPI few releases ago. This is a continuation of that process towards removing uuid_le one.

Note, there is no ABI change!

Can you clarify why guid_t is not used instead?

It's internal type to the kernel. The libuuid or so should provide a compatible type(s) for user space.

Quoted 2 lines

Is the plan to remove it
from UAPI as well?

Yes.

Quoted 24 lines

Wei.

Quoted 22 lines
---
 include/uapi/linux/hyperv.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
include/uapi/linux/hyperv.h +2 -2
index 991b2b7ada7a3..8f24404ad04f1 100644
@@ -119,8 +119,8 @@ enum hv_fcopy_op {
 
 struct hv_fcopy_hdr {
 	__u32 operation;
-	uuid_le service_id0; /* currently unused */
-	uuid_le service_id1; /* currently unused */
+	__u8 service_id0[16]; /* currently unused */
+	__u8 service_id1[16]; /* currently unused */
 } __attribute__((packed));
 
 #define OVER_WRITE	0x1
Signature · 1 line
2.26.1
Signature · 2 lines
With Best Regards,
Andy Shevchenko
maintainer
#3 lore raw
Quoted 14 lines · Andy Shevchenko
Quoted 4 lines · Wei Liu
Quoted 3 lines · Andy Shevchenko

The uuid_le mistakenly comes to be an UAPI type. Since it's luckily not used by Hyper-V APIs, we may replace with POD types, i.e. __u8 array.

Quoted 8 lines
Quoted 6 lines

Note, previously shared uuid_be had been removed from UAPI few releases ago. This is a continuation of that process towards removing uuid_le one.

Note, there is no ABI change!

Can you clarify why guid_t is not used instead?

Quoted 8 lines

It's internal type to the kernel. The libuuid or so should provide a compatible type(s) for user space.

Quoted 2 lines

Is the plan to remove it
from UAPI as well?

Yes.

OK. Thanks for explaining.

Wei.

Quoted 30 lines
Quoted 24 lines

Wei.

Quoted 22 lines
---
 include/uapi/linux/hyperv.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
include/uapi/linux/hyperv.h +2 -2
index 991b2b7ada7a3..8f24404ad04f1 100644
@@ -119,8 +119,8 @@ enum hv_fcopy_op {
 
 struct hv_fcopy_hdr {
 	__u32 operation;
-	uuid_le service_id0; /* currently unused */
-	uuid_le service_id1; /* currently unused */
+	__u8 service_id0[16]; /* currently unused */
+	__u8 service_id1[16]; /* currently unused */
 } __attribute__((packed));
 
 #define OVER_WRITE	0x1
Signature · 1 line
2.26.1
Signature · 2 lines
With Best Regards,
Andy Shevchenko