search for: vsock_find_bound_socket

Displaying 20 results from an estimated 41 matches for "vsock_find_bound_socket".

2019 Nov 28
5
[RFC PATCH 0/3] vsock: support network namespace
Hi, now that we have multi-transport upstream, I started to take a look to support network namespace (netns) in vsock. As we partially discussed in the multi-transport proposal [1], it could be nice to support network namespace in vsock to reach the following goals: - isolate host applications from guest applications using the same ports with CID_ANY - assign the same CID of VMs running in
2019 Nov 28
5
[RFC PATCH 0/3] vsock: support network namespace
Hi, now that we have multi-transport upstream, I started to take a look to support network namespace (netns) in vsock. As we partially discussed in the multi-transport proposal [1], it could be nice to support network namespace in vsock to reach the following goals: - isolate host applications from guest applications using the same ports with CID_ANY - assign the same CID of VMs running in
2015 May 27
0
[RFC 1/6] VSOCK: Introduce vsock_find_unbound_socket and vsock_bind_dgram_generic
...lude/net/af_vsock.h index 172632d..d52b984 100644 --- a/include/net/af_vsock.h +++ b/include/net/af_vsock.h @@ -172,8 +172,10 @@ void vsock_insert_connected(struct vsock_sock *vsk); void vsock_remove_bound(struct vsock_sock *vsk); void vsock_remove_connected(struct vsock_sock *vsk); struct sock *vsock_find_bound_socket(struct sockaddr_vm *addr); +struct sock *vsock_find_unbound_socket(struct sockaddr_vm *addr); struct sock *vsock_find_connected_socket(struct sockaddr_vm *src, struct sockaddr_vm *dst); void vsock_for_each_connected_socket(void (*fn)(struct sock *sk)); +int vsock_bind_dgram_generic(struct...
2020 May 31
0
[PATCH v3] virtio_vsock: Fix race condition in virtio_transport_recv_pkt
...will be a panic on a ThunderX2 (armv8a server): ... > The race condition is as follows: > Task1 Task2 > ===== ===== > __sock_release virtio_transport_recv_pkt > __vsock_release vsock_find_bound_socket (found sk) > lock_sock_nested > vsock_remove_sock > sock_orphan > sk_set_socket(sk, NULL) > sk->sk_shutdown = SHUTDOWN_MASK > ... > release_sock > lock_sock > virti...
2020 May 29
0
[PATCH v2] virtio_vsock: Fix race condition in virtio_transport_recv_pkt
...^ Maybe we can remove these two columns from the commit message. > > The race condition as follows: > Task1 Task2 > ===== ===== > __sock_release virtio_transport_recv_pkt > __vsock_release vsock_find_bound_socket (found) > lock_sock_nested > vsock_remove_sock > sock_orphan > sk_set_socket(sk, NULL) Here we can add: sk->sk_shutdown = SHUTDOWN_MASK; > ... > release_sock > lock_sock >...
2020 May 29
0
[PATCH] virtio_vsock: Fix race condition in virtio_transport_recv_pkt
...+0x128/0x130 > [ 463.719052][ T5040] ret_from_fork+0x10/0x18 > > The race condition as follows: > Task1 Task2 > ===== ===== > __sock_release virtio_transport_recv_pkt > __vsock_release vsock_find_bound_socket (found) > lock_sock_nested > vsock_remove_sock > sock_orphan > sk_set_socket(sk, NULL) > ... > release_sock > lock_sock > virtio_transport_recv_connecting >...
2019 Sep 27
0
[RFC PATCH 05/13] vsock/virtio: add transport parameter to the virtio_transport_reset_no_sock()
..._cnt)); if (le16_to_cpu(pkt->hdr.type) != VIRTIO_VSOCK_TYPE_STREAM) { - (void)virtio_transport_reset_no_sock(pkt); + (void)virtio_transport_reset_no_sock(t, pkt); goto free_pkt; } @@ -1080,7 +1080,7 @@ void virtio_transport_recv_pkt(struct virtio_vsock_pkt *pkt) if (!sk) { sk = vsock_find_bound_socket(&dst); if (!sk) { - (void)virtio_transport_reset_no_sock(pkt); + (void)virtio_transport_reset_no_sock(t, pkt); goto free_pkt; } } -- 2.21.0
2015 Dec 09
1
[PATCH v2] Revert "Merge branch 'vsock-virtio'"
...lude/net/af_vsock.h index a0c8fa2..e9eb2d6 100644 --- a/include/net/af_vsock.h +++ b/include/net/af_vsock.h @@ -175,10 +175,8 @@ void vsock_insert_connected(struct vsock_sock *vsk); void vsock_remove_bound(struct vsock_sock *vsk); void vsock_remove_connected(struct vsock_sock *vsk); struct sock *vsock_find_bound_socket(struct sockaddr_vm *addr); -struct sock *vsock_find_unbound_socket(struct sockaddr_vm *addr); struct sock *vsock_find_connected_socket(struct sockaddr_vm *src, struct sockaddr_vm *dst); void vsock_for_each_connected_socket(void (*fn)(struct sock *sk)); -int vsock_bind_dgram_generic(struct...
2015 Dec 09
1
[PATCH v2] Revert "Merge branch 'vsock-virtio'"
...lude/net/af_vsock.h index a0c8fa2..e9eb2d6 100644 --- a/include/net/af_vsock.h +++ b/include/net/af_vsock.h @@ -175,10 +175,8 @@ void vsock_insert_connected(struct vsock_sock *vsk); void vsock_remove_bound(struct vsock_sock *vsk); void vsock_remove_connected(struct vsock_sock *vsk); struct sock *vsock_find_bound_socket(struct sockaddr_vm *addr); -struct sock *vsock_find_unbound_socket(struct sockaddr_vm *addr); struct sock *vsock_find_connected_socket(struct sockaddr_vm *src, struct sockaddr_vm *dst); void vsock_for_each_connected_socket(void (*fn)(struct sock *sk)); -int vsock_bind_dgram_generic(struct...
2015 Dec 08
8
[PATCH 0/6] VSOCK: revert virtio-vsock until device spec is finalized
The virtio-vsock device specification is not finalized yet. Michael Tsirkin voiced concerned about merging this code when the hardware interface (and possibly the userspace interface) could still change. Please revert for now. I am working to finalize the virtio-vsock device specification and at that point the interfaces will be stable. Stefan Hajnoczi (6): Revert "VSOCK: fix
2015 Dec 08
8
[PATCH 0/6] VSOCK: revert virtio-vsock until device spec is finalized
The virtio-vsock device specification is not finalized yet. Michael Tsirkin voiced concerned about merging this code when the hardware interface (and possibly the userspace interface) could still change. Please revert for now. I am working to finalize the virtio-vsock device specification and at that point the interfaces will be stable. Stefan Hajnoczi (6): Revert "VSOCK: fix
2015 May 27
6
[RFC 0/6] Add virtio transport for AF_VSOCK
This patch series adds a virtio transport for AF_VSOCK (net/vmw_vsock/). AF_VSOCK is designed for communication between virtual machines and hypervisors. It is currently only implemented for VMware's VMCI transport. This series implements the proposed virtio-vsock device specification from here: http://comments.gmane.org/gmane.comp.emulators.virtio.devel/855 Most of the work was done by
2015 May 27
6
[RFC 0/6] Add virtio transport for AF_VSOCK
This patch series adds a virtio transport for AF_VSOCK (net/vmw_vsock/). AF_VSOCK is designed for communication between virtual machines and hypervisors. It is currently only implemented for VMware's VMCI transport. This series implements the proposed virtio-vsock device specification from here: http://comments.gmane.org/gmane.comp.emulators.virtio.devel/855 Most of the work was done by
2015 Dec 10
1
[PATCH v3 1/4] VSOCK: Introduce virtio-vsock-common.ko
...ST */ TODO's shouldn't make it into final submissions. > + goto free_pkt; > + } > + > + /* The socket must be in connected or bound table > + * otherwise send reset back > + */ > + sk = vsock_find_connected_socket(&src, &dst); > + if (!sk) { > + sk = vsock_find_bound_socket(&dst); > + if (!sk) { > + pr_debug("%s: can not find bound_socket\n", __func__); > + virtio_vsock_dumppkt(__func__, pkt); > + /* Ignore this pkt instead of sending reset back */ > + /* TODO send a RST unless this packet is a RST > (to avoid infinite loops) *...
2015 Dec 10
1
[PATCH v3 1/4] VSOCK: Introduce virtio-vsock-common.ko
...ST */ TODO's shouldn't make it into final submissions. > + goto free_pkt; > + } > + > + /* The socket must be in connected or bound table > + * otherwise send reset back > + */ > + sk = vsock_find_connected_socket(&src, &dst); > + if (!sk) { > + sk = vsock_find_bound_socket(&dst); > + if (!sk) { > + pr_debug("%s: can not find bound_socket\n", __func__); > + virtio_vsock_dumppkt(__func__, pkt); > + /* Ignore this pkt instead of sending reset back */ > + /* TODO send a RST unless this packet is a RST > (to avoid infinite loops) *...
2014 Jul 05
9
[RFC V2 0/7] Introduce VM Sockets virtio transport
Hello guys, This was V2 of the virtio-vsock back in last October. I do not have time to work on it since then. People are asking the latest status of virtio-vsock from time to time, so I'm sending out the code for people who are interested in. Feel free to grab the code and work on it if you want. In commit d021c344051af91 (VSOCK: Introduce VM Sockets), VMware added VM Sockets support. VM
2014 Jul 05
9
[RFC V2 0/7] Introduce VM Sockets virtio transport
Hello guys, This was V2 of the virtio-vsock back in last October. I do not have time to work on it since then. People are asking the latest status of virtio-vsock from time to time, so I'm sending out the code for people who are interested in. Feel free to grab the code and work on it if you want. In commit d021c344051af91 (VSOCK: Introduce VM Sockets), VMware added VM Sockets support. VM
2015 Dec 02
8
[PATCH v2 0/5] Add virtio transport for AF_VSOCK
v2: * Rebased onto Linux v4.4-rc2 * vhost: Refuse to assign reserved CIDs * vhost: Refuse guest CID if already in use * vhost: Only accept correctly addressed packets (no spoofing!) * vhost: Support flexible rx/tx descriptor layout * vhost: Add missing total_tx_buf decrement * virtio_transport: Fix total_tx_buf accounting * virtio_transport: Add virtio_transport global mutex to prevent
2015 Dec 02
8
[PATCH v2 0/5] Add virtio transport for AF_VSOCK
v2: * Rebased onto Linux v4.4-rc2 * vhost: Refuse to assign reserved CIDs * vhost: Refuse guest CID if already in use * vhost: Only accept correctly addressed packets (no spoofing!) * vhost: Support flexible rx/tx descriptor layout * vhost: Add missing total_tx_buf decrement * virtio_transport: Fix total_tx_buf accounting * virtio_transport: Add virtio_transport global mutex to prevent
2013 Jun 27
13
[RFC 0/5] Introduce VM Sockets virtio transport
Hello guys, In commit d021c344051af91 (VSOCK: Introduce VM Sockets), VMware added VM Sockets support. VM Sockets allows communication between virtual machines and the hypervisor. VM Sockets is able to use different hyervisor neutral transport to transfer data. Currently, only VMware VMCI transport is supported. This series introduces virtio transport for VM Sockets. Any comments are