[PATCH] VMCI: Verify PPNs before sending to device

2019-01-16 Thread Jorgen Hansen via Virtualization
The current version of the VMCI device only supports 32 bit PPNs, so check whether we are truncating PPNs, and fail the operation if we do. One such check did exist, but was wrong. Another check was missing. Testing through code modification: constructed PPN not representable by 32-bit and

[PATCH] VMCI/VSOCK: Add maintainers for VMCI, AF_VSOCK and VMCI transport

2019-03-21 Thread Jorgen Hansen via Virtualization
Update the maintainers file to include maintainers for the VMware vmci driver, af_vsock, and the vsock vmci transport. Signed-off-by: Jorgen Hansen --- MAINTAINERS | 20 1 file changed, 20 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index e17ebf7..b9714fc 100644

RE: [PATCH net-next 12/14] vsock/vmci: register vmci_transport only when VMCI guest/host are active

2019-11-11 Thread Jorgen Hansen via Virtualization
> From: Stefano Garzarella [mailto:sgarz...@redhat.com] > Sent: Wednesday, October 23, 2019 11:56 AM > > To allow other transports to be loaded with vmci_transport, > we register the vmci_transport as G2H or H2G only when a VMCI guest > or host is active. > > To do that, this patch adds a

RE: [PATCH net-next 14/14] vsock: fix bind() behaviour taking care of CID

2019-11-11 Thread Jorgen Hansen via Virtualization
> From: Stefano Garzarella [mailto:sgarz...@redhat.com] > Sent: Wednesday, October 23, 2019 11:56 AM > When we are looking for a socket bound to a specific address, > we also have to take into account the CID. > > This patch is useful with multi-transports support because it > allows the binding

RE: [PATCH net-next 13/14] vsock: prevent transport modules unloading

2019-11-11 Thread Jorgen Hansen via Virtualization
> From: Stefano Garzarella [mailto:sgarz...@redhat.com] > Sent: Wednesday, October 23, 2019 11:56 AM > This patch adds 'module' member in the 'struct vsock_transport' > in order to get/put the transport module. This prevents the > module unloading while sockets are assigned to it. > > We

RE: [PATCH net-next 11/14] vsock: add multi-transports support

2019-11-11 Thread Jorgen Hansen via Virtualization
> From: Stefano Garzarella [mailto:sgarz...@redhat.com] > Sent: Wednesday, October 23, 2019 11:56 AM Thanks a lot for working on this! > With the multi-transports support, we can use vsock with nested VMs (using > also different hypervisors) loading both guest->host and > host->guest transports

RE: [PATCH net-next 06/14] vsock: add 'struct vsock_sock *' param to vsock_core_get_transport()

2019-10-30 Thread Jorgen Hansen via Virtualization
> From: Stefano Garzarella [mailto:sgarz...@redhat.com] > Sent: Wednesday, October 23, 2019 11:56 AM > Subject: [PATCH net-next 06/14] vsock: add 'struct vsock_sock *' param to > vsock_core_get_transport() > > Since now the 'struct vsock_sock' object contains a pointer to the transport, > this

RE: [PATCH net-next 07/14] vsock: handle buffer_size sockopts in the core

2019-10-30 Thread Jorgen Hansen via Virtualization
> From: Stefano Garzarella [mailto:sgarz...@redhat.com] > Sent: Wednesday, October 23, 2019 11:56 AM > Subject: [PATCH net-next 07/14] vsock: handle buffer_size sockopts in the > core > > virtio_transport and vmci_transport handle the buffer_size sockopts in a > very similar way. > > In order to

RE: [PATCH net-next 02/14] vsock: remove vm_sockets_get_local_cid()

2019-10-30 Thread Jorgen Hansen via Virtualization
> -Original Message- > From: Stefano Garzarella [mailto:sgarz...@redhat.com] > Sent: Wednesday, October 23, 2019 11:56 AM > To: net...@vger.kernel.org > Subject: [PATCH net-next 02/14] vsock: remove vm_sockets_get_local_cid() > > vm_sockets_get_local_cid() is only used in

RE: [PATCH net-next 01/14] vsock/vmci: remove unused VSOCK_DEFAULT_CONNECT_TIMEOUT

2019-10-30 Thread Jorgen Hansen via Virtualization
> From: Stefano Garzarella [mailto:sgarz...@redhat.com] > Sent: Wednesday, October 23, 2019 11:56 AM > Subject: [PATCH net-next 01/14] vsock/vmci: remove unused > VSOCK_DEFAULT_CONNECT_TIMEOUT > > The VSOCK_DEFAULT_CONNECT_TIMEOUT definition was introduced with > commit d021c344051af ("VSOCK:

RE: [PATCH net-next 03/14] vsock: remove include/linux/vm_sockets.h file

2019-10-30 Thread Jorgen Hansen via Virtualization
> From: Stefano Garzarella [mailto:sgarz...@redhat.com] > Sent: Wednesday, October 23, 2019 11:56 AM > Subject: [PATCH net-next 03/14] vsock: remove include/linux/vm_sockets.h > file > > This header file now only includes the "uapi/linux/vm_sockets.h". > We can include directly it when needed. >

RE: [PATCH net-next 04/14] vsock: add 'transport' member in the struct vsock_sock

2019-10-30 Thread Jorgen Hansen via Virtualization
> From: Stefano Garzarella [mailto:sgarz...@redhat.com] > Sent: Wednesday, October 23, 2019 11:56 AM > Subject: [PATCH net-next 04/14] vsock: add 'transport' member in the struct > vsock_sock > > As a preparation to support multiple transports, this patch adds the > 'transport' member at the

RE: [PATCH net-next 09/14] vsock: move vsock_insert_unbound() in the vsock_create()

2019-10-30 Thread Jorgen Hansen via Virtualization
> From: Stefano Garzarella [mailto:sgarz...@redhat.com] > Sent: Wednesday, October 23, 2019 11:56 AM > Subject: [PATCH net-next 09/14] vsock: move vsock_insert_unbound() in the > vsock_create() > > vsock_insert_unbound() was called only when 'sock' parameter of > __vsock_create() was not null.

RE: [PATCH net-next 08/14] vsock: add vsock_create_connected() called by transports

2019-10-30 Thread Jorgen Hansen via Virtualization
> From: Stefano Garzarella [mailto:sgarz...@redhat.com] > Sent: Wednesday, October 23, 2019 11:56 AM > Subject: [PATCH net-next 08/14] vsock: add vsock_create_connected() called > by transports > > All transports call __vsock_create() with the same parameters, > most of them depending on the

RE: [PATCH net-next 11/14] vsock: add multi-transports support

2019-10-30 Thread Jorgen Hansen via Virtualization
> From: Stefano Garzarella [mailto:sgarz...@redhat.com] > > +/* Assign a transport to a socket and call the .init transport callback. > > + * > > + * Note: for stream socket this must be called when vsk->remote_addr > > +is set > > + * (e.g. during the connect() or when a connection request on a >

RE: [PATCH net-next 11/14] vsock: add multi-transports support

2019-11-13 Thread Jorgen Hansen via Virtualization
> From: Stefano Garzarella [mailto:sgarz...@redhat.com] > Sent: Tuesday, November 12, 2019 11:37 AM > > > > You already mentioned that you are working on a fix for loopback > > > > here for the guest, but presumably a host could also do loopback. > > > > > > IIUC we don't support loopback in the

RE: [PATCH net-next 11/14] vsock: add multi-transports support

2019-11-12 Thread Jorgen Hansen via Virtualization
> From: Stefano Garzarella [mailto:sgarz...@redhat.com] > Sent: Monday, November 11, 2019 6:18 PM > To: Jorgen Hansen > Subject: Re: [PATCH net-next 11/14] vsock: add multi-transports support > > On Mon, Nov 11, 2019 at 01:53:39PM +, Jorgen Hansen wrote: > > > From: Stefano Garzarella

RE: [PATCH net-next 12/14] vsock/vmci: register vmci_transport only when VMCI guest/host are active

2019-11-12 Thread Jorgen Hansen via Virtualization
> From: Stefano Garzarella [mailto:sgarz...@redhat.com] > Sent: Monday, November 11, 2019 6:31 PM > On Mon, Nov 11, 2019 at 04:27:28PM +, Jorgen Hansen wrote: > > > From: Stefano Garzarella [mailto:sgarz...@redhat.com] > > > Sent: Wednesday, October 23, 2019 11:56 AM > > > > > > To allow other

RE: [PATCH net-next 3/6] vsock: add local transport support in the vsock core

2019-11-21 Thread Jorgen Hansen via Virtualization
> From: Stefano Garzarella [mailto:sgarz...@redhat.com] > Sent: Tuesday, November 19, 2019 12:01 PM > To: net...@vger.kernel.org > > This patch allows to register a transport able to handle > local communication (loopback). > > Signed-off-by: Stefano Garzarella > --- > include/net/af_vsock.h

RE: [PATCH net-next 2/6] vsock: add VMADDR_CID_LOCAL definition

2019-11-21 Thread Jorgen Hansen via Virtualization
> From: Stefano Garzarella [mailto:sgarz...@redhat.com] > Sent: Tuesday, November 19, 2019 12:01 PM > > The VMADDR_CID_RESERVED (1) was used by VMCI, but now it is not > used anymore, so we can reuse it for local communication > (loopback) adding the new well-know CID: VMADDR_CID_LOCAL. > > Cc:

RE: [PATCH net-next 0/6] vsock: add local transport support

2019-11-21 Thread Jorgen Hansen via Virtualization
> From: Stefano Garzarella [mailto:sgarz...@redhat.com] > Sent: Tuesday, November 19, 2019 12:01 PM > This series introduces a new transport (vsock_loopback) to handle > local communication. > This could be useful to test vsock core itself and to allow developers > to test their applications

RE: [PATCH net-next 3/6] vsock: add local transport support in the vsock core

2019-11-21 Thread Jorgen Hansen via Virtualization
> From: Stefano Garzarella [mailto:sgarz...@redhat.com] > Sent: Thursday, November 21, 2019 4:22 PM > > On Thu, Nov 21, 2019 at 03:04:18PM +, Jorgen Hansen wrote: > > > From: Stefano Garzarella [mailto:sgarz...@redhat.com] > > > Sent: Tuesday, November 19, 2019 12:01 PM > > > To:

RE: [PATCH net-next 3/6] vsock: add local transport support in the vsock core

2019-11-21 Thread Jorgen Hansen via Virtualization
> From: Stefano Garzarella [mailto:sgarz...@redhat.com] > Sent: Thursday, November 21, 2019 5:13 PM > > On Thu, Nov 21, 2019 at 03:53:47PM +, Jorgen Hansen wrote: > > > From: Stefano Garzarella [mailto:sgarz...@redhat.com] > > > Sent: Thursday, November 21, 2019 4:22 PM > > > > > > On Thu,