New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VSock: Initial datagram implementation for Argo. #1
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm very happy to see this initial driver -- thanks for putting it together (with documentation, very nice!). It looks well structured and like a good starting point.
I have some minor feedback points below - nothing heavy. I have not tested this driver yet but it builds fine.
v2
|
v3
|
Based on Xen 4.12.0 released headers. An Argo implementation for VSock for datagram transfers. Support basic packet communication across domains. Rings are registered at socket naming (bind(3p)). There is one ring created per partner in the domain. This includes ANY, which Xen will allow only in mac-permissive mode for Argo. Send is synchronous: does an hypercall directly, like V4V used to do. Recv is handled in a tasklet that will make skbs with data recovered from the ring. Ring size is hardcoded to 32 pages currently. Signed-off-by: Eric Chanudet <chanudete@ainfosec.com> OXT-1473
V4
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the changes for the last round. Moving on to building it now: the build succeeds but it's ignoring the warnings indicated in this review -- mismatching types for the format strings.
Can the build be made to use -Werror
?
Very simple tool to send/recv things through VSock. Basic usage: hatch domid port hatch -r -p local_port Options: -r, --recv receive mode, wait for incoming packets. -p, --port set local port number. -D enable debug output on stderr. Debug is logged on stderr to allow stdout redirection. If vsock_argo_transport.ko was not loaded, vmw_vsock_vmci_transport.ko will likely be loaded by default (depends on the installation). You need to remove vmw_vsock_vmci_transport.ko before you can load vsock_argo_transport.ko again. Signed-off-by: Eric Chanudet <chanudete@ainfosec.com> OXT-1473
Walk through how to test VSock/Argo. Signed-off-by: Eric Chanudet <chanudete@ainfosec.com>
v5
|
Builds clean now. Merging. |
…ux-xen-argo:openxt_master_merge to master * commit '11866bceac9974f6f688e84b8a6116e8d9c65675': argo-module: constify iov pointer argo-module: unused variable in kernel <4.19 argo-module: Linux 5.0 access_ok() stub argo-linux: Implicit fall through argo-linux: use init_pseudo for vfs argo-linux: suppress SMAP warnings vsock: suppress SMAP warnings gitignore: Remove top-level libargo: Amend gitignore vsock-argo: Add built-in objects to gitignore argo-linux: Add built-in objects to gitignore argo-modules: Put some printks behind ARGO_DEBUG Try to auto-bind to the partner's domid README: Initial documentation. vsock/test: Netcat-like utility for Argo DGRAM. vsock/module: Initial datagram implementation.
An out-of-tree module for VSock DGRAM over Argo.
Based on headers released with Xen 4.12.
A copy of Xen
argo.h
header is added to the out-of-tree module to ease the compilation process against existing kernel headers, since it is not shipped as part of Linux headers.Also re-introduce
hypercall5
inargo-compat.h
, removed from upstream as it was no longer used, see comments in the header.Add a test utility for VSock/Argo DGRAM transfers
Simple test tool to send/recv things over VSock through Argo and ease testing. It tries to mimic
netcat
usage to not look too unfamiliar.socat
should be able to achieve the same, with a steeper learning curve. This will be made easier once STREAM communication are implemented I would think.Provide instructions in a README
Add some instruction on how to test VSock/Argo on existing Xen 4.12.y installations. Try to address caveats that may be encountered and provide some details as to what is this all about.