All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 1/1] virt: acrn: Drop internal kernel type from ABI
@ 2021-10-01 13:56 Andy Shevchenko
  2021-10-01 14:01 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 5+ messages in thread
From: Andy Shevchenko @ 2021-10-01 13:56 UTC (permalink / raw)
  To: Reinette Chatre, Greg Kroah-Hartman, Shuo Liu, Zhi Wang,
	Andy Shevchenko, linux-kernel
  Cc: Fei Li

guid_t is internal type of the kernel which is mistakenly had been exposed
to the user space. Replace it with raw buffers.

Besides that it's obvious from the link in the sample code, that the real
use is of uuid_t type, but because uuid_t hasn't exposed, so should guid_t,
the code includes and uses wrong type.

Fixes: 5b06931d7f8b ("sample/acrn: Introduce a sample of HSM ioctl interface usage")
Fixes: 9c5137aedd11 ("virt: acrn: Introduce VM management interfaces")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 include/uapi/linux/acrn.h | 3 +--
 samples/acrn/vm-sample.c  | 5 ++++-
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/include/uapi/linux/acrn.h b/include/uapi/linux/acrn.h
index 353b2a2e4536..4312af1b8013 100644
--- a/include/uapi/linux/acrn.h
+++ b/include/uapi/linux/acrn.h
@@ -12,7 +12,6 @@
 #define _UAPI_ACRN_H
 
 #include <linux/types.h>
-#include <linux/uuid.h>
 
 #define ACRN_IO_REQUEST_MAX		16
 
@@ -198,7 +197,7 @@ struct acrn_vm_creation {
 	__u16	reserved0;
 	__u16	vcpu_num;
 	__u16	reserved1;
-	guid_t	uuid;
+	__u8	uuid[16];
 	__u64	vm_flag;
 	__u64	ioreq_buf;
 	__u64	cpu_affinity;
diff --git a/samples/acrn/vm-sample.c b/samples/acrn/vm-sample.c
index b2dad47a77a0..1639fcadc766 100644
--- a/samples/acrn/vm-sample.c
+++ b/samples/acrn/vm-sample.c
@@ -30,7 +30,10 @@ static struct acrn_io_request *io_req_buf = (struct acrn_io_request *)io_request
 __u16 vcpu_num;
 __u16 vmid;
 /* POST_STANDARD_VM_UUID1, refer to https://github.com/projectacrn/acrn-hypervisor/blob/master/hypervisor/include/common/vm_uuids.h */
-guid_t vm_uuid = GUID_INIT(0x385479d2, 0xd625, 0xe811, 0x86, 0x4e, 0xcb, 0x7a, 0x18, 0xb3, 0x46, 0x43);
+__u8 vm_uuid[16] = {
+	0xd2, 0x79, 0x54, 0x38, 0x25, 0xd6, 0x11, 0xe8,
+	0x86, 0x4e, 0xcb, 0x7a, 0x18, 0xb3, 0x46, 0x43,
+};
 
 int hsm_fd;
 int is_running = 1;
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-12-13 20:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-01 13:56 [PATCH v1 1/1] virt: acrn: Drop internal kernel type from ABI Andy Shevchenko
2021-10-01 14:01 ` Greg Kroah-Hartman
2021-10-01 14:58   ` Andy Shevchenko
2021-10-01 15:10     ` Greg Kroah-Hartman
2021-12-13 20:18       ` Andy Shevchenko

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.