search for: src_cid

Displaying 20 results from an estimated 114 matches for "src_cid".

2016 Dec 07
1
[PATCH 09/10] vsock/virtio: fix src/dst cid format
...set_no_sock(struct virtio_vsock_pkt *pkt) > return 0; > > pkt = virtio_transport_alloc_pkt(&info, 0, > - le32_to_cpu(pkt->hdr.dst_cid), > + le64_to_cpu(pkt->hdr.dst_cid), > le32_to_cpu(pkt->hdr.dst_port), > - le32_to_cpu(pkt->hdr.src_cid), > + le64_to_cpu(pkt->hdr.src_cid), > le32_to_cpu(pkt->hdr.src_port)); Looking at sockaddr_vm, svm_cid is "unsigned int", do we really want 64 bit here? > if (!pkt) > return -ENOMEM; > @@ -823,7 +823,7 @@ virtio_transport_send_response(struct v...
2016 Dec 07
1
[PATCH 09/10] vsock/virtio: fix src/dst cid format
...set_no_sock(struct virtio_vsock_pkt *pkt) > return 0; > > pkt = virtio_transport_alloc_pkt(&info, 0, > - le32_to_cpu(pkt->hdr.dst_cid), > + le64_to_cpu(pkt->hdr.dst_cid), > le32_to_cpu(pkt->hdr.dst_port), > - le32_to_cpu(pkt->hdr.src_cid), > + le64_to_cpu(pkt->hdr.src_cid), > le32_to_cpu(pkt->hdr.src_port)); Looking at sockaddr_vm, svm_cid is "unsigned int", do we really want 64 bit here? > if (!pkt) > return -ENOMEM; > @@ -823,7 +823,7 @@ virtio_transport_send_response(struct v...
2019 Dec 06
5
[PATCH] vhost/vsock: accept only packets with the right dst_cid
When we receive a new packet from the guest, we check if the src_cid is correct, but we forgot to check the dst_cid. The host should accept only packets where dst_cid is equal to the host CID. Signed-off-by: Stefano Garzarella <sgarzare at redhat.com> --- drivers/vhost/vsock.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/vh...
2019 Dec 06
5
[PATCH] vhost/vsock: accept only packets with the right dst_cid
When we receive a new packet from the guest, we check if the src_cid is correct, but we forgot to check the dst_cid. The host should accept only packets where dst_cid is equal to the host CID. Signed-off-by: Stefano Garzarella <sgarzare at redhat.com> --- drivers/vhost/vsock.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/vh...
2016 Dec 06
0
[PATCH 09/10] vsock/virtio: fix src/dst cid format
...606,9 @@ static int virtio_transport_reset_no_sock(struct virtio_vsock_pkt *pkt) return 0; pkt = virtio_transport_alloc_pkt(&info, 0, - le32_to_cpu(pkt->hdr.dst_cid), + le64_to_cpu(pkt->hdr.dst_cid), le32_to_cpu(pkt->hdr.dst_port), - le32_to_cpu(pkt->hdr.src_cid), + le64_to_cpu(pkt->hdr.src_cid), le32_to_cpu(pkt->hdr.src_port)); if (!pkt) return -ENOMEM; @@ -823,7 +823,7 @@ virtio_transport_send_response(struct vsock_sock *vsk, struct virtio_vsock_pkt_info info = { .op = VIRTIO_VSOCK_OP_RESPONSE, .type = VIRTIO_VSOCK_TYPE_STR...
2016 Dec 06
26
[PATCH 00/10] virtio: sparse fixes
I run latest sparse from git on virtio drivers (turns out the version I had was rather outdated). This patchset fixes a couple of bugs this uncovered, and adds some annotations to make it sparse-clean. In particular, endian-ness is often tricky, so this patchset enabled endian-ness checks for sparse builds. Michael S. Tsirkin (10): virtio_console: drop unused config fields drm/virtio: fix
2016 Dec 06
26
[PATCH 00/10] virtio: sparse fixes
I run latest sparse from git on virtio drivers (turns out the version I had was rather outdated). This patchset fixes a couple of bugs this uncovered, and adds some annotations to make it sparse-clean. In particular, endian-ness is often tricky, so this patchset enabled endian-ness checks for sparse builds. Michael S. Tsirkin (10): virtio_console: drop unused config fields drm/virtio: fix
2016 Apr 01
7
[RFC v5 0/5] Add virtio transport for AF_VSOCK
This series is based on Michael Tsirkin's vhost branch (v4.5-rc6). I'm about to process Claudio Imbrenda's locking fixes for virtio-vsock but first I want to share the latest version of the code. Several people are playing with vsock now so sharing the latest code should avoid duplicate work. v5: * Transport reset event for live migration support * Reorder virtqueues, drop unused
2016 Apr 01
7
[RFC v5 0/5] Add virtio transport for AF_VSOCK
This series is based on Michael Tsirkin's vhost branch (v4.5-rc6). I'm about to process Claudio Imbrenda's locking fixes for virtio-vsock but first I want to share the latest version of the code. Several people are playing with vsock now so sharing the latest code should avoid duplicate work. v5: * Transport reset event for live migration support * Reorder virtqueues, drop unused
2015 Dec 22
8
[RFC v4 0/5] Add virtio transport for AF_VSOCK
This series is based on v4.4-rc2 and the "virtio: make find_vqs() checkpatch.pl-friendly" patch I recently submitted. v4: * Addressed code review comments from Alex Bennee * MAINTAINERS file entries for new files * Trace events instead of pr_debug() * RST packet is sent when there is no listen socket * Allow guest->host connections again (began discussing netfilter support with
2015 Dec 22
8
[RFC v4 0/5] Add virtio transport for AF_VSOCK
This series is based on v4.4-rc2 and the "virtio: make find_vqs() checkpatch.pl-friendly" patch I recently submitted. v4: * Addressed code review comments from Alex Bennee * MAINTAINERS file entries for new files * Trace events instead of pr_debug() * RST packet is sent when there is no listen socket * Allow guest->host connections again (began discussing netfilter support with
2014 Jul 05
0
[RFC V2 3/7] VSOCK: Introduce virtio-vsock-common.ko
...const struct virtio_vsock_pkt *pkt); + +struct sock * +virtio_transport_get_pending(struct sock *listener, + struct virtio_vsock_pkt *pkt); +struct virtio_vsock_pkt * +virtio_transport_alloc_pkt(struct vsock_sock *vsk, + struct virtio_vsock_pkt_info *info, + size_t len, + u32 src_cid, + u32 src_port, + u32 dst_cid, + u32 dst_port); +ssize_t +virtio_transport_stream_dequeue(struct vsock_sock *vsk, + struct iovec *iov, + size_t len, + int type); +int +virtio_transport_dgram_dequeue(struct kiocb *kiocb, + struct vsock_sock *vsk, + struct m...
2016 Dec 07
2
[PATCH 08/10] vsock/virtio: mark an internal function static
...*virtio_transport_get_ops(void) > return container_of(t, struct virtio_transport, transport); > } > > -struct virtio_vsock_pkt * > +static struct virtio_vsock_pkt * > virtio_transport_alloc_pkt(struct virtio_vsock_pkt_info *info, > size_t len, > u32 src_cid, Git grep shows it was used by tracing.
2019 Dec 10
0
[PATCH] vhost/vsock: accept only packets with the right dst_cid
On Fri, Dec 06, 2019 at 03:39:12PM +0100, Stefano Garzarella wrote: > When we receive a new packet from the guest, we check if the > src_cid is correct, but we forgot to check the dst_cid. > > The host should accept only packets where dst_cid is > equal to the host CID. > > Signed-off-by: Stefano Garzarella <sgarzare at redhat.com> what's the implication of processing incorrect dst cid? I think mostly it'...
2019 Dec 11
0
[PATCH] vhost/vsock: accept only packets with the right dst_cid
On Fri, Dec 06, 2019 at 03:39:12PM +0100, Stefano Garzarella wrote: > When we receive a new packet from the guest, we check if the > src_cid is correct, but we forgot to check the dst_cid. > > The host should accept only packets where dst_cid is > equal to the host CID. > > Signed-off-by: Stefano Garzarella <sgarzare at redhat.com> Stefano can you clarify the impact pls? E.g. is this needed on stable? Etc. Thank...
2016 Dec 07
2
[PATCH 08/10] vsock/virtio: mark an internal function static
...*virtio_transport_get_ops(void) > return container_of(t, struct virtio_transport, transport); > } > > -struct virtio_vsock_pkt * > +static struct virtio_vsock_pkt * > virtio_transport_alloc_pkt(struct virtio_vsock_pkt_info *info, > size_t len, > u32 src_cid, Git grep shows it was used by tracing.
2013 Jun 27
1
[RFC 2/5] VSOCK: Introduce virtio-vsock-common.ko
...> +struct sock * > +virtio_transport_get_pending(struct sock *listener, > + struct virtio_vsock_pkt *pkt); > +struct virtio_vsock_pkt * > +virtio_transport_alloc_pkt(struct vsock_sock *vsk, > + struct virtio_vsock_pkt_info *info, > + size_t len, > + u32 src_cid, > + u32 src_port, > + u32 dst_cid, > + u32 dst_port); > +ssize_t > +virtio_transport_stream_dequeue(struct vsock_sock *vsk, > + struct iovec *iov, > + size_t len, > + int type); > +int > +virtio_transport_dgram_dequeue(struct kiocb *kiocb, >...
2013 Jun 27
1
[RFC 2/5] VSOCK: Introduce virtio-vsock-common.ko
...> +struct sock * > +virtio_transport_get_pending(struct sock *listener, > + struct virtio_vsock_pkt *pkt); > +struct virtio_vsock_pkt * > +virtio_transport_alloc_pkt(struct vsock_sock *vsk, > + struct virtio_vsock_pkt_info *info, > + size_t len, > + u32 src_cid, > + u32 src_port, > + u32 dst_cid, > + u32 dst_port); > +ssize_t > +virtio_transport_stream_dequeue(struct vsock_sock *vsk, > + struct iovec *iov, > + size_t len, > + int type); > +int > +virtio_transport_dgram_dequeue(struct kiocb *kiocb, >...
2015 Dec 10
1
[PATCH v3 1/4] VSOCK: Introduce virtio-vsock-common.ko
...> +struct sock * > +virtio_transport_get_pending(struct sock *listener, > + struct virtio_vsock_pkt *pkt); > +struct virtio_vsock_pkt * > +virtio_transport_alloc_pkt(struct vsock_sock *vsk, > + struct virtio_vsock_pkt_info *info, > + size_t len, > + u32 src_cid, > + u32 src_port, > + u32 dst_cid, > + u32 dst_port); > +ssize_t > +virtio_transport_stream_dequeue(struct vsock_sock *vsk, > + struct msghdr *msg, > + size_t len, > + int type); > +int > +virtio_transport_dgram_dequeue(struct vsock_sock *vsk,...
2015 Dec 10
1
[PATCH v3 1/4] VSOCK: Introduce virtio-vsock-common.ko
...> +struct sock * > +virtio_transport_get_pending(struct sock *listener, > + struct virtio_vsock_pkt *pkt); > +struct virtio_vsock_pkt * > +virtio_transport_alloc_pkt(struct vsock_sock *vsk, > + struct virtio_vsock_pkt_info *info, > + size_t len, > + u32 src_cid, > + u32 src_port, > + u32 dst_cid, > + u32 dst_port); > +ssize_t > +virtio_transport_stream_dequeue(struct vsock_sock *vsk, > + struct msghdr *msg, > + size_t len, > + int type); > +int > +virtio_transport_dgram_dequeue(struct vsock_sock *vsk,...