-
Notifications
You must be signed in to change notification settings - Fork 373
virtcontainers: endianess issue #947
Comments
@alicefr thanks for this detailed explanation!
I would say that we want to fix the issue properly, and that means we should fix both So you could start with |
/cc @markdryan. |
@sboeuf I agree, it could also avoid future bugs. I don't know if the ioctl in utils_linux in the only place where the issue appears |
The PR changes the parameter args to uint32 into uint64 for ioctl function. That leads to an endianess bug. Fixes: kata-containers#947 Signed-off-by: Alice Frosi <afrosi@de.ibm.com>
The PR changes the parameter args from uint32 to uint64 for ioctl function. That leads to an endianess bug. Fixes: kata-containers#947 Signed-off-by: Alice Frosi <afrosi@de.ibm.com>
The correct type used by qemu and in kernel is uint64 and this leads to an endianess problem with ioctl system call. See the issue kata-containers/runtime#947 Fixes: kata-containers#70 Signed-off-by: Alice Frosi <afrosi@de.ibm.com>
The correct type used by qemu and in kernel is uint64 and this leads to an endianess problem with ioctl system call. See the issue kata-containers/runtime#947 Fixes: kata-containers#70 Signed-off-by: Alice Frosi <afrosi@de.ibm.com>
To solve the second point the pr kata-containers/govmm#71 needs to be merged |
The PR changes the parameter args from uint32 to uint64 for ioctl function. That leads to an endianess bug. Fixes: kata-containers#947 Signed-off-by: Alice Frosi <afrosi@de.ibm.com>
The CID of VSock needs to be change to uint64. Otherwise that leads to an endianess issue. For more details see kata-containers#947 Fixes: kata-containers#958 Signed-off-by: Alice Frosi <afrosi@de.ibm.com>
The PR changes the parameter args from uint32 to uint64 for ioctl function. That leads to an endianess bug. Fixes: kata-containers#947 Signed-off-by: Alice Frosi <afrosi@de.ibm.com>
The CID of VSock needs to be change to uint64. Otherwise that leads to an endianess issue. For more details see kata-containers#947 Fixes: kata-containers#958 Signed-off-by: Alice Frosi <afrosi@de.ibm.com>
The CID of VSock needs to be change to uint64. Otherwise that leads to an endianess issue. For more details see kata-containers#947 Fixes: kata-containers#958 Signed-off-by: Alice Frosi <afrosi@de.ibm.com>
The CID of VSock needs to be change to uint64. Otherwise that leads to an endianess issue. For more details see kata-containers#947 Remove the uint64 introduced by kata-containers#984 Fixes: kata-containers#958 Signed-off-by: Alice Frosi <afrosi@de.ibm.com>
In the utils_linux.go there is an endianess bug. I'm testing the
kata-runtime
on s390x (big endian) withvsock
and the function ioctlFunc always returned EINVAL(errno=22). I tried to reproduce the issue with these small golang programs:test32.go:
and test64.go
As you probably noticed the single difference between the 2 files is the:
On s390x:
on x86_64
In the kernel the cid for vsock is u64 (see https://github.com/torvalds/linux/blob/ef78e5ec9214376c5cb989f5da70b02d0c117b66/drivers/vhost/vsock.c#L664). Up to now only the first 32 bits are used as you can see from the comment. However, if the args is a
unit32
, that provokes an endianess issue.There are 2 possibilites:
1- Change the args type in ioctlFunc from
uint32
touint64
2- Change all the CID vsock from
unit32
touint64
. That requires also to change the type in govmmThe text was updated successfully, but these errors were encountered: