Re: [RFC] vsock: proposal to support multiple transports at runtime

2019-05-23 Thread Stefan Hajnoczi
On Tue, May 14, 2019 at 10:15:43AM +0200, Stefano Garzarella wrote: > Hi guys, > I'm currently interested on implement a multi-transport support for VSOCK in > order to handle nested VMs. > > As Stefan suggested me, I started to look at this discussion: > https://lkml.org/lkml/2017/8/17/551 > Belo

Re: [PATCH net-next v1 1/3] vm_sockets: Include flag field in the vsock address data structure

2020-12-03 Thread Stefan Hajnoczi
On Tue, Dec 01, 2020 at 05:25:03PM +0200, Andra Paraschiv wrote: > vsock enables communication between virtual machines and the host they > are running on. With the multi transport support (guest->host and > host->guest), nested VMs can also use vsock channels for communication. > > In addition to

Re: [PATCH] vhost scsi: fix error return code in vhost_scsi_set_endpoint()

2020-12-07 Thread Stefan Hajnoczi
-by: Hulk Robot > Signed-off-by: Zhang Changzhong > --- > drivers/vhost/scsi.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) Acked-by: Stefan Hajnoczi signature.asc Description: PGP signature

Re: [PATCH net] vsock: forward all packets to the host when no H2G is registered

2020-11-19 Thread Stefan Hajnoczi
; > Cc: Jorgen Hansen > Cc: Dexuan Cui > Fixes: c0cfa2d8a788 ("vsock: add multi-transports support") > Reported-by: Andra Paraschiv > Tested-by: Andra Paraschiv > Signed-off-by: Stefano Garzarella > --- > net/vmw_vsock/af_vsock.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Acked-by: Stefan Hajnoczi signature.asc Description: PGP signature

Re: [PATCH 0/7] Introduce vdpa management tool

2020-11-16 Thread Stefan Hajnoczi
Great! A few questions and comments: How are configuration parameters passed in during device creation (e.g. MAC address, number of queues)? Can configuration parameters be changed at runtime (e.g. link up/down)? Does the configuration parameter interface distinguish between standard and vendor-

Re: [PATCH 06/21] vdpa: introduce virtqueue groups

2021-01-04 Thread Stefan Hajnoczi
On Wed, Dec 16, 2020 at 02:48:03PM +0800, Jason Wang wrote: > This patch introduces virtqueue groups to vDPA device. The virtqueue > group is the minimal set of virtqueues that must share an address > space. And the adddress space identifier could only be attached to > a specific virtqueue group. >

Re: [PATCH v2] vhost/vsock: add IOTLB API support

2021-01-04 Thread Stefan Hajnoczi
,ats=on > > [1] https://lists.gnu.org/archive/html/qemu-devel/2020-10/msg09077.html > > Reviewed-by: Stefan Hajnoczi > Signed-off-by: Stefano Garzarella > --- > > The patch is the same of v1, but I re-tested it with: > - QEMU v5.2.0-551-ga05f8ecd88 > - Linux 5.9.15

Re: [PATCH] vhost/vsock: add IOTLB API support

2020-10-30 Thread Stefan Hajnoczi
igned-off-by: Stefano Garzarella > --- > drivers/vhost/vsock.c | 68 +++++-- > 1 file changed, 65 insertions(+), 3 deletions(-) Reviewed-by: Stefan Hajnoczi signature.asc Description: PGP signature

Re: REGRESSION: RIP: 0010:skb_release_data+0xb8/0x1e0 in vhost/tun

2024-03-19 Thread Stefan Hajnoczi
On Tue, Mar 19, 2024 at 10:00:08AM +0100, Igor Raits wrote: > Hello, > > We have started to observe kernel crashes on 6.7.y kernels (atm we > have hit the issue 5 times on 6.7.5 and 6.7.10). On 6.6.9 where we > have nodes of cluster it looks stable. Please see stacktrace below. If > you need more

Re: memory leak in virtio_transport_send_pkt_info

2021-03-31 Thread Stefan Hajnoczi
On Mon, Feb 08, 2021 at 08:39:30AM -0800, syzbot wrote: > Hello, > > syzbot found the following issue on: > > HEAD commit:9f29bd8b Merge tag 'fs_for_v5.11-rc5' of git://git.kernel... > git tree: upstream > console output: https://syzkaller.appspot.com/x/log.txt?x=11e435af50 > kernel

Re: [PATCH v6 10/10] Documentation: Add documentation for VDUSE

2021-04-14 Thread Stefan Hajnoczi
On Wed, Mar 31, 2021 at 04:05:19PM +0800, Xie Yongji wrote: > VDUSE (vDPA Device in Userspace) is a framework to support > implementing software-emulated vDPA devices in userspace. This > document is intended to clarify the VDUSE design and usage. > > Signed-off-by: Xie Yongji > --- > Documentat

Re: Re: [PATCH v6 10/10] Documentation: Add documentation for VDUSE

2021-04-15 Thread Stefan Hajnoczi
On Thu, Apr 15, 2021 at 01:38:37PM +0800, Yongji Xie wrote: > On Wed, Apr 14, 2021 at 10:15 PM Stefan Hajnoczi wrote: > > > > On Wed, Mar 31, 2021 at 04:05:19PM +0800, Xie Yongji wrote: > > > VDUSE (vDPA Device in Userspace) is a framework to support > > > im

Re: Re: Re: [PATCH v6 10/10] Documentation: Add documentation for VDUSE

2021-04-15 Thread Stefan Hajnoczi
On Thu, Apr 15, 2021 at 04:33:27PM +0800, Yongji Xie wrote: > On Thu, Apr 15, 2021 at 3:19 PM Stefan Hajnoczi wrote: > > On Thu, Apr 15, 2021 at 01:38:37PM +0800, Yongji Xie wrote: > > > On Wed, Apr 14, 2021 at 10:15 PM Stefan Hajnoczi > > > wrote: > > >

Re: [PATCH v6 10/10] Documentation: Add documentation for VDUSE

2021-04-15 Thread Stefan Hajnoczi
On Thu, Apr 15, 2021 at 04:36:35PM +0800, Jason Wang wrote: > > 在 2021/4/15 下午3:19, Stefan Hajnoczi 写道: > > On Thu, Apr 15, 2021 at 01:38:37PM +0800, Yongji Xie wrote: > > > On Wed, Apr 14, 2021 at 10:15 PM Stefan Hajnoczi > > > wrote: > > > > On

Re: [PATCH] scsi: target: vhost-scsi: remove redundant initialization of variable ret

2021-03-04 Thread Stefan Hajnoczi
On Wed, Mar 03, 2021 at 01:43:39PM +, Colin King wrote: > From: Colin Ian King > > The variable ret is being initialized with a value that is never read > and it is being updated later with a new value. The initialization is > redundant and can be removed. > > Addresses-Coverity: ("Unused v

Re: [PATCH net-next] vsock: correct removal of socket from the list

2019-06-13 Thread Stefan Hajnoczi
ed-off-by: Sunil Muthuswamy > --- > net/vmw_vsock/af_vsock.c | 38 +++--- > 1 file changed, 7 insertions(+), 31 deletions(-) Reviewed-by: Stefan Hajnoczi signature.asc Description: PGP signature

Re: [PATCH] VSOCK: make af_vsock.ko removable again

2018-04-17 Thread Stefan Hajnoczi
On Tue, Apr 17, 2018 at 09:45:12AM -0400, David Miller wrote: > From: Stefan Hajnoczi > Date: Tue, 17 Apr 2018 14:25:58 +0800 > > > Commit c1eef220c1760762753b602c382127bfccee226d ("vsock: always call > > vsock_init_tables()") introduced a module_init() funct

Re: [v2] vhost: add vsock compat ioctl

2018-03-22 Thread Stefan Hajnoczi
On Fri, Mar 16, 2018 at 7:30 PM, David Miller wrote: > Although the top level ioctls are probably size and layout compatible, > I do not think that the deeper ioctls can be called by compat binaries > without some translations in order for them to work. I audited the vhost ioctl code when reviewi

Re: [PATCH] vsock: only load vmci transport on VMware hypervisor by default

2017-08-17 Thread Stefan Hajnoczi
On Thu, Aug 17, 2017 at 08:00:29AM +, Dexuan Cui wrote: > > Without the patch, vmw_vsock_vmci_transport.ko can automatically load > when an application creates an AF_VSOCK socket. > > This is the expected good behavior on VMware hypervisor, but as we > are going to add hv_sock.ko (i.e. Hyper-

Re: [PATCH] vsock: only load vmci transport on VMware hypervisor by default

2017-08-18 Thread Stefan Hajnoczi
On Fri, Aug 18, 2017 at 03:07:30AM +, Dexuan Cui wrote: > > From: Jorgen S. Hansen [mailto:jhan...@vmware.com] > > Sent: Thursday, August 17, 2017 08:17 > > > > > > Putting aside nested virtualization, I want to load the transport (vmci, > > > Hyper-V, vsock) for which there is paravirtualized

Re: [PATCH net-next 3/3] hv_sock: implements Hyper-V transport for Virtual Sockets (AF_VSOCK)

2017-08-18 Thread Stefan Hajnoczi
On Tue, Aug 15, 2017 at 10:18:41PM +, Dexuan Cui wrote: > +static u32 hvs_get_local_cid(void) > +{ > + return VMADDR_CID_ANY; > +} Interesting concept: the guest never knows its CID. This is nice from a live migration perspective. Currently VMCI and virtio adjust listen socket local CIDs

Re: [PATCH net-next 2/3] vsock: fix vsock_dequeue/enqueue_accept race

2017-08-18 Thread Stefan Hajnoczi
On Tue, Aug 15, 2017 at 10:15:39PM +, Dexuan Cui wrote: > With the current code, when vsock_dequeue_accept() is removing a sock > from the list, nothing prevents vsock_enqueue_accept() from adding a new > sock into the list concurrently. We should add a lock to protect the list. The listener s

Re: [PATCH] vsock: only load vmci transport on VMware hypervisor by default

2017-08-22 Thread Stefan Hajnoczi
On Fri, Aug 18, 2017 at 11:07:37PM +, Dexuan Cui wrote: > > From: Stefan Hajnoczi [mailto:stefa...@redhat.com] > > > CID is not really used by us, because we only support guest<->host > > communication, > > > and don't support guest<->guest

Re: [PATCH net-next 3/3] hv_sock: implements Hyper-V transport for Virtual Sockets (AF_VSOCK)

2017-08-22 Thread Stefan Hajnoczi
On Fri, Aug 18, 2017 at 10:23:54PM +, Dexuan Cui wrote: > > From: Stefan Hajnoczi [mailto:stefa...@redhat.com] > > Sent: Thursday, August 17, 2017 07:56 > > To: Dexuan Cui > > On Tue, Aug 15, 2017 at 10:18:41PM +, Dexuan Cui wrote: > > > +

Re: [PATCH net-next 3/3] hv_sock: implements Hyper-V transport for Virtual Sockets (AF_VSOCK)

2017-08-24 Thread Stefan Hajnoczi
On Tue, Aug 22, 2017 at 09:40:01PM +, Dexuan Cui wrote: > > From: Stefan Hajnoczi [mailto:stefa...@redhat.com] > > On Fri, Aug 18, 2017 at 10:23:54PM +, Dexuan Cui wrote: > > > > > +static bool hvs_stream_allow(u32 cid, u32 port) > > > > > +{ &

Re: [RFC v2] vsock: proposal to support multiple transports at runtime

2019-08-19 Thread Stefan Hajnoczi
On Thu, Jun 06, 2019 at 12:09:12PM +0200, Stefano Garzarella wrote: > > Hi all, > this is a v2 of a proposal addressing the comments made by Dexuan, Stefan, > and Jorgen. > > v1: https://www.spinics.net/lists/netdev/msg570274.html > > > > We can define two types of transport that we have to ha

Re: [PATCH v2 11/11] vsock_test: wait for the remote to close the connection

2019-08-23 Thread Stefan Hajnoczi
On Thu, Aug 22, 2019 at 11:15:46AM +0200, Stefano Garzarella wrote: > On Tue, Aug 20, 2019 at 09:28:28AM +0100, Stefan Hajnoczi wrote: > > On Thu, Aug 01, 2019 at 05:25:41PM +0200, Stefano Garzarella wrote: > > > +/* Wait for the remote to close the connect

Re: [PATCH] vsock/virtio: fix kernel panic from virtio_transport_reset_no_sock

2019-03-06 Thread Stefan Hajnoczi
On Tue, Mar 05, 2019 at 08:01:45PM +0200, Adalbert Lazăr wrote: Thanks for the patch, Adalbert! Please add a Signed-off-by tag so your patch can be merged (see Documentation/process/submitting-patches.rst Chapter 11 for details on the Developer's Certificate of Origin). > static int virtio_tran

Re: [PATCH] vsock/virtio: fix kernel panic from virtio_transport_reset_no_sock

2019-03-06 Thread Stefan Hajnoczi
On Wed, Mar 06, 2019 at 11:10:41AM +0200, Adalbert Lazăr wrote: > On Wed, 6 Mar 2019 08:41:04 +0000, Stefan Hajnoczi wrote: > > On Tue, Mar 05, 2019 at 08:01:45PM +0200, Adalbert Lazăr wrote: > > The pkt argument is the received packet that we must reply to. > > The reply pac

Re: [PATCH v2] vsock/virtio: fix kernel panic from virtio_transport_reset_no_sock

2019-03-07 Thread Stefan Hajnoczi
fb_sys_fops virtio_net psmouse drm net_failover pata_acpi > virtio_blk failover floppy > > Fixes: 22b5c0b63f32 ("vsock/virtio: fix kernel panic after device hot-unplug") > Reported-by: Alexandru Herghelegiu > Signed-off-by: Adalbert Lazăr > Co-developed-by: Stefan Hajnoczi > --- > net/vmw_vsock/virtio_transport_common.c | 22 +++--- > 1 file changed, 15 insertions(+), 7 deletions(-) Excellent, thanks! Reviewed-by: Stefan Hajnoczi signature.asc Description: PGP signature

[PATCH v3 2/5] VSOCK: move __vsock_in_bound/connected_table() to af_vsock.h

2017-10-05 Thread Stefan Hajnoczi
The vsock_diag.ko module will need to check socket table membership. Signed-off-by: Stefan Hajnoczi --- include/net/af_vsock.h | 12 net/vmw_vsock/af_vsock.c | 10 -- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/include/net/af_vsock.h b/include/net

[PATCH v3 1/5] VSOCK: export socket tables for sock_diag interface

2017-10-05 Thread Stefan Hajnoczi
The socket table symbols need to be exported from vsock.ko so that the vsock_diag.ko module will be able to traverse sockets. Signed-off-by: Stefan Hajnoczi --- include/net/af_vsock.h | 5 + net/vmw_vsock/af_vsock.c | 10 ++ 2 files changed, 11 insertions(+), 4 deletions(-) diff

[PATCH v3 0/5] VSOCK: add sock_diag interface

2017-10-05 Thread Stefan Hajnoczi
only tested the virtio transport but this should also work for VMCI and Hyper-V. Please give it a shot if you have time. Stefan Hajnoczi (5): VSOCK: export socket tables for sock_diag interface VSOCK: move __vsock_in_bound/connected_table() to af_vsock.h VSOCK: use TCP state constants for

[PATCH v3 4/5] VSOCK: add sock_diag interface

2017-10-05 Thread Stefan Hajnoczi
extending vsock_diag_dump() if needed by VMCI users. Signed-off-by: Stefan Hajnoczi --- MAINTAINERS | 2 + net/vmw_vsock/Makefile | 3 + include/uapi/linux/vm_sockets_diag.h | 33 +++ net/vmw_vsock/diag.c | 186

[PATCH v3 3/5] VSOCK: use TCP state constants for sk_state

2017-10-05 Thread Stefan Hajnoczi
P_CLOSING VSOCK_SS_LISTEN -> TCP_LISTEN In __vsock_create() the sk_state initialization was dropped because sock_init_data() already initializes sk_state to TCP_CLOSE. Signed-off-by: Stefan Hajnoczi --- include/net/af_vsock.h | 3 -- net/vmw_vsock/af_vs

[PATCH v3 5/5] VSOCK: add tools/testing/vsock/vsock_diag_test

2017-10-05 Thread Stefan Hajnoczi
future. Signed-off-by: Stefan Hajnoczi --- MAINTAINERS | 1 + tools/testing/vsock/Makefile | 9 + tools/testing/vsock/control.h | 13 + tools/testing/vsock/timeout.h | 14 + tools/testing/vsock/control.c | 219 +++ tools

[PATCH iproute2 v2 3/3] ss: add AF_VSOCK support

2017-10-06 Thread Stefan Hajnoczi
to an IP address. AF_VSOCK ports work like TCP/UDP ports. Both SOCK_STREAM and SOCK_DGRAM socket types are available. This patch adds AF_VSOCK support to ss(8) so that sockets can be observed. Signed-off-by: Stefan Hajnoczi --- misc/ss.c

[PATCH iproute2 v2 1/3] ss: allow AF_FAMILY constants >32

2017-10-06 Thread Stefan Hajnoczi
s so introduce the FAMILY_MASK() macro to eliminate these bugs. Signed-off-by: Stefan Hajnoczi --- misc/ss.c | 54 -- 1 file changed, 28 insertions(+), 26 deletions(-) diff --git a/misc/ss.c b/misc/ss.c index dd8dfaa4..005e781d 100644 --- a/m

[PATCH iproute2 v2 2/3] include: add

2017-10-06 Thread Stefan Hajnoczi
This new Linux header file defines the sock_diag interface used by AF_VSOCK. This new header file was merged in net-next in commit 413a4317aca7d6367d57a5971b0c461f03851207 ("VSOCK: add sock_diag interface"). Signed-off-by: Stefan Hajnoczi --- include/linux/vm_sockets_d

[PATCH iproute2 v2 0/3] ss: add AF_VSOCK support

2017-10-06 Thread Stefan Hajnoczi
AF_VSOCK sockets: $ ss --vsock The vsock_diag.ko module has now been merged in the Linux net-next tree. I have verified that the header copy in this patch series is in sync with Linux net-next. See commit 5820299a271fd3dc9b1733e1e10cd7b983edd028 ("Merge branch 'VSOCK-sock_diag'

Re: [PATCH] drivers: vhost: vsock: fixed a brace coding style issue

2018-03-09 Thread Stefan Hajnoczi
On Fri, Mar 09, 2018 at 08:26:03AM +0530, Vaibhav Murkute wrote: > Fixed a coding style issue. > > Signed-off-by: Vaibhav Murkute > --- > drivers/vhost/vsock.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) Reviewed-by: Stefan Hajnoczi signature.asc Description: PGP signature

Re: [PATCH v2] vhost: add vsock compat ioctl

2018-03-16 Thread Stefan Hajnoczi
On Wed, Mar 14, 2018 at 02:36:25PM -0700, Sonny Rao wrote: > This will allow usage of vsock from 32-bit binaries on a 64-bit > kernel. > > Signed-off-by: Sonny Rao > --- > drivers/vhost/vsock.c | 11 +++ > 1 file changed, 11 insertions(+) Reviewed-by: Stefan Hajn

Re: kernel BUG at drivers/vhost/vhost.c:LINE! (2)

2018-04-08 Thread Stefan Hajnoczi
On Sat, Apr 7, 2018 at 3:02 AM, syzbot wrote: > syzbot hit the following crash on upstream commit > 38c23685b273cfb4ccf31a199feccce3bdcb5d83 (Fri Apr 6 04:29:35 2018 +) > Merge tag 'armsoc-drivers' of > git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc > syzbot dashboard link: > https:

Re: kernel BUG at drivers/vhost/vhost.c:LINE! (2)

2018-04-08 Thread Stefan Hajnoczi
On Mon, Apr 09, 2018 at 05:44:36AM +0300, Michael S. Tsirkin wrote: > On Mon, Apr 09, 2018 at 10:37:45AM +0800, Stefan Hajnoczi wrote: > > On Sat, Apr 7, 2018 at 3:02 AM, syzbot > > wrote: > > > syzbot hit the following crash on upstream commit > > > 38c23685b273

Re: kernel BUG at drivers/vhost/vhost.c:LINE! (2)

2018-04-09 Thread Stefan Hajnoczi
On Mon, Apr 9, 2018 at 11:28 AM, Stefan Hajnoczi wrote: > On Mon, Apr 09, 2018 at 05:44:36AM +0300, Michael S. Tsirkin wrote: >> On Mon, Apr 09, 2018 at 10:37:45AM +0800, Stefan Hajnoczi wrote: >> > On Sat, Apr 7, 2018 at 3:02 AM, syzbot >> > wrote: >> >

Re: [PATCH RESEND net] vhost: fix vhost_vq_access_ok() log check

2018-04-09 Thread Stefan Hajnoczi
On Tue, Apr 10, 2018 at 3:40 AM, Michael S. Tsirkin wrote: > From: Stefan Hajnoczi > > Commit d65026c6c62e7d9616c8ceb5a53b68bcdc050525 ("vhost: validate log > when IOTLB is enabled") introduced a regression. The logic was > originally: > > if (vq->iotlb) &

[PATCH v2 1/2] vhost: fix vhost_vq_access_ok() log check

2018-04-09 Thread Stefan Hajnoczi
gt;iotlb) return A; return B; This patch fixes the regression by rewriting the checks in the obvious way, no longer returning A when vq->iotlb is non-NULL (which is hard to understand). Reported-by: syzbot+65a84dde0214b0387...@syzkaller.appspotmail.com Cc: Jason Wang Signed-off-by: St

[PATCH v2 2/2] vhost: return bool from *_access_ok() functions

2018-04-09 Thread Stefan Hajnoczi
changes the return type from int to bool so that false means failure and true means success. This eliminates a potential source of errors. Suggested-by: Linus Torvalds Signed-off-by: Stefan Hajnoczi --- drivers/vhost/vhost.h | 4 ++-- drivers/vhost/vhost.c | 66

[PATCH v2 0/2] vhost: fix vhost_vq_access_ok() log check

2018-04-09 Thread Stefan Hajnoczi
prevent future bugs. Stefan Hajnoczi (2): vhost: fix vhost_vq_access_ok() log check vhost: return bool from *_access_ok() functions drivers/vhost/vhost.h | 4 +-- drivers/vhost/vhost.c | 70 ++- 2 files changed, 38 insertions(+), 36 deletions

Re: [PATCH v2 0/2] vhost: fix vhost_vq_access_ok() log check

2018-04-10 Thread Stefan Hajnoczi
On Tue, Apr 10, 2018 at 10:50:43AM -0400, David Miller wrote: > From: Jason Wang > Date: Tue, 10 Apr 2018 14:40:10 +0800 > > > On 2018年04月10日 13:26, Stefan Hajnoczi wrote: > >> v2: > >> * Rewrote the conditional to make the vq access check clearer [Linus] &

Re: [virtio-dev] Re: [RFC] vhost: introduce mdev based hardware vhost backend

2018-04-10 Thread Stefan Hajnoczi
On Tue, Apr 10, 2018 at 09:23:53AM +, Liang, Cunming wrote: > If QEMU is going to build a user space driver framework there, we're open > mind on that, even leveraging DPDK as the underlay library. Looking forward > to more others' comments from community. There is already an NVMe VFIO drive

[PATCH v3 2/2] vhost: return bool from *_access_ok() functions

2018-04-10 Thread Stefan Hajnoczi
changes the return type from int to bool so that false means failure and true means success. This eliminates a potential source of errors. Suggested-by: Linus Torvalds Signed-off-by: Stefan Hajnoczi --- drivers/vhost/vhost.h | 4 ++-- drivers/vhost/vhost.c | 66

[PATCH v3 0/2] vhost: fix vhost_vq_access_ok() log check

2018-04-10 Thread Stefan Hajnoczi
broken. The second patch replaces the int return type with bool to prevent future bugs. Stefan Hajnoczi (2): vhost: fix vhost_vq_access_ok() log check vhost: return bool from *_access_ok() functions drivers/vhost/vhost.h | 4 +-- drivers/vhost/vhost.c | 70

[PATCH v3 1/2] vhost: fix vhost_vq_access_ok() log check

2018-04-10 Thread Stefan Hajnoczi
gt;iotlb) return A; return B; This patch fixes the regression by rewriting the checks in the obvious way, no longer returning A when vq->iotlb is non-NULL (which is hard to understand). Reported-by: syzbot+65a84dde0214b0387...@syzkaller.appspotmail.com Cc: Jason Wang Signed-off-by: St

[PATCH] VSOCK: make af_vsock.ko removable again

2018-04-16 Thread Stefan Hajnoczi
ive. 2. vsock_diag.ko does not perform any action that requires cleanup by vsock.ko. Reported-by: Xiumei Mu Cc: Cong Wang Cc: Jorgen Hansen Signed-off-by: Stefan Hajnoczi --- net/vmw_vsock/af_vsock.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/net/vmw_vsock/af_vsock.c b/

Re: [PATCH] VSOCK: fix uapi/linux/vm_sockets.h incomplete types

2017-09-20 Thread Stefan Hajnoczi
On Tue, Sep 19, 2017 at 10:38:40AM -0700, David Miller wrote: > From: Stefan Hajnoczi > Date: Mon, 18 Sep 2017 16:21:00 +0100 > > > On Fri, Sep 15, 2017 at 02:14:32PM -0700, David Miller wrote: > >> > diff --git a/include/uapi/linux/vm_sockets.h > >>

Re: [PATCH net-next RFC 1/5] vhost: split out ring head fetching logic

2017-09-22 Thread Stefan Hajnoczi
On Fri, Sep 22, 2017 at 04:02:31PM +0800, Jason Wang wrote: > +/* This looks in the virtqueue and for the first available buffer, and > converts > + * it to an iovec for convenient access. Since descriptors consist of some > + * number of output then some number of input descriptors, it's actuall

Re: [PATCH net-next RFC 2/5] vhost: introduce helper to prefetch desc index

2017-09-22 Thread Stefan Hajnoczi
On Fri, Sep 22, 2017 at 04:02:32PM +0800, Jason Wang wrote: > diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c > index f87ec75..8424166d 100644 > --- a/drivers/vhost/vhost.c > +++ b/drivers/vhost/vhost.c > @@ -2437,6 +2437,61 @@ struct vhost_msg_node *vhost_dequeue_msg(struct > vhost_dev

Re: [PATCH net-next RFC 3/5] vhost: introduce vhost_add_used_idx()

2017-09-22 Thread Stefan Hajnoczi
rs/vhost/vhost.c | 33 + > drivers/vhost/vhost.h | 1 + > 2 files changed, 34 insertions(+) Reviewed-by: Stefan Hajnoczi

[PATCH 5/5] VSOCK: add tools/vsock/vsock_diag_test

2017-10-03 Thread Stefan Hajnoczi
future. Signed-off-by: Stefan Hajnoczi --- MAINTAINERS | 1 + tools/vsock/Makefile | 9 + tools/vsock/control.h | 13 + tools/vsock/timeout.h | 14 + tools/vsock/control.c | 219 ++ tools/vsock/timeout.c | 64 tools

[PATCH 0/5] VSOCK: add sock_diag interface

2017-10-03 Thread Stefan Hajnoczi
transport but this should also work for VMCI and Hyper-V. Please give it a shot if you have time. Stefan Hajnoczi (5): VSOCK: export socket tables for sock_diag interface VSOCK: export __vsock_in_bound/connected_table() VSOCK: use TCP state constants for sk_state VSOCK: add sock_diag interface

[PATCH 1/5] VSOCK: export socket tables for sock_diag interface

2017-10-03 Thread Stefan Hajnoczi
The socket table symbols need to be exported from vsock.ko so that the vsock_diag.ko module will be able to traverse sockets. Signed-off-by: Stefan Hajnoczi --- include/net/af_vsock.h | 5 + net/vmw_vsock/af_vsock.c | 10 ++ 2 files changed, 11 insertions(+), 4 deletions(-) diff

[PATCH 2/5] VSOCK: export __vsock_in_bound/connected_table()

2017-10-03 Thread Stefan Hajnoczi
The vsock_diag.ko module will need to check socket table membership. Signed-off-by: Stefan Hajnoczi --- include/net/af_vsock.h | 2 ++ net/vmw_vsock/af_vsock.c | 6 -- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/include/net/af_vsock.h b/include/net/af_vsock.h index

[PATCH 3/5] VSOCK: use TCP state constants for sk_state

2017-10-03 Thread Stefan Hajnoczi
P_CLOSING VSOCK_SS_LISTEN -> TCP_LISTEN In __vsock_create() the sk_state initialization was dropped because sock_init_data() already initializes sk_state to TCP_CLOSE. Signed-off-by: Stefan Hajnoczi --- include/net/af_vsock.h | 3 -- net/vmw_vsock/af_vs

[PATCH 4/5] VSOCK: add sock_diag interface

2017-10-03 Thread Stefan Hajnoczi
extending vsock_diag_dump() if needed by VMCI users. Signed-off-by: Stefan Hajnoczi --- MAINTAINERS | 2 + net/vmw_vsock/Makefile | 3 + include/uapi/linux/vm_sockets_diag.h | 33 +++ net/vmw_vsock/diag.c | 186

[PATCH iproute2 2/3] include: add

2017-10-03 Thread Stefan Hajnoczi
This new Linux header file defines the sock_diag interface used by AF_VSOCK. Signed-off-by: Stefan Hajnoczi --- include/linux/vm_sockets_diag.h | 33 + 1 file changed, 33 insertions(+) create mode 100644 include/linux/vm_sockets_diag.h diff --git a/include

[PATCH iproute2 0/3] ss: add AF_VSOCK support

2017-10-03 Thread Stefan Hajnoczi
g interface". That patch series also adds the header file that this patch series relies on. The Linux patches are also available here: https://github.com/stefanha/linux/commits/vsock-diag Stefan Hajnoczi (3): ss: allow AF_FAMILY constants >32 include: add ss: add AF_VSOCK supp

[PATCH iproute2 3/3] ss: add AF_VSOCK support

2017-10-03 Thread Stefan Hajnoczi
to an IP address. AF_VSOCK ports work like TCP/UDP ports. Both SOCK_STREAM and SOCK_DGRAM socket types are available. This patch adds AF_VSOCK support to ss(8) so that sockets can be observed. Signed-off-by: Stefan Hajnoczi --- misc/ss.c

[PATCH iproute2 1/3] ss: allow AF_FAMILY constants >32

2017-10-03 Thread Stefan Hajnoczi
s so introduce the FAMILY_MASK() macro to eliminate these bugs. Signed-off-by: Stefan Hajnoczi --- misc/ss.c | 54 -- 1 file changed, 28 insertions(+), 26 deletions(-) diff --git a/misc/ss.c b/misc/ss.c index dd8dfaa4..12a31c90 100644 --- a/m

Re: [PATCH iproute2 1/3] ss: allow AF_FAMILY constants >32

2017-10-04 Thread Stefan Hajnoczi
On Tue, Oct 03, 2017 at 11:26:53AM -0700, Stephen Hemminger wrote: > On Tue, 3 Oct 2017 13:57:42 -0400 > Stefan Hajnoczi wrote: > > > Linux has more than 32 address families defined in . Use > > a 64-bit type so all of them can be represented in the filter->families &g

Re: [PATCH iproute2 2/3] include: add

2017-10-04 Thread Stefan Hajnoczi
On Tue, Oct 03, 2017 at 11:24:55AM -0700, Stephen Hemminger wrote: > On Tue, 3 Oct 2017 13:57:43 -0400 > Stefan Hajnoczi wrote: > > > This new Linux header file defines the sock_diag interface used by > > AF_VSOCK. > > > > Signed-off-by: Stefan Haj

Re: [PATCH 4/5] VSOCK: add sock_diag interface

2017-10-04 Thread Stefan Hajnoczi
On Tue, Oct 03, 2017 at 09:46:52PM -0700, David Miller wrote: > From: Stefan Hajnoczi > Date: Tue, 3 Oct 2017 11:39:42 -0400 > > > +static int sk_diag_fill(struct sock *sk, struct sk_buff *skb, > > + u32 portid, u32 seq, u32 flags) > > +{ &

Re: [PATCH 5/5] VSOCK: add tools/vsock/vsock_diag_test

2017-10-04 Thread Stefan Hajnoczi
On Tue, Oct 03, 2017 at 09:48:05PM -0700, David Miller wrote: > From: Stefan Hajnoczi > Date: Tue, 3 Oct 2017 11:39:43 -0400 > > > MAINTAINERS | 1 + > > tools/vsock/Makefile | 9 + > > tools/vsock/control.h | 13 +

Re: [PATCH 2/5] VSOCK: export __vsock_in_bound/connected_table()

2017-10-04 Thread Stefan Hajnoczi
On Tue, Oct 03, 2017 at 09:46:17PM -0700, David Miller wrote: > From: Stefan Hajnoczi > Date: Tue, 3 Oct 2017 11:39:40 -0400 > > > @@ -250,15 +250,17 @@ static struct sock > > *__vsock_find_connected_socket(struct sockaddr_vm *src, > > return NULL; &g

[PATCH v2 0/5] VSOCK: add sock_diag interface

2017-10-04 Thread Stefan Hajnoczi
. Please give it a shot if you have time. Stefan Hajnoczi (5): VSOCK: export socket tables for sock_diag interface VSOCK: move __vsock_in_bound/connected_table() to af_vsock.h VSOCK: use TCP state constants for sk_state VSOCK: add sock_diag interface VSOCK: add tools/testing/vsock

[PATCH v2 1/5] VSOCK: export socket tables for sock_diag interface

2017-10-04 Thread Stefan Hajnoczi
The socket table symbols need to be exported from vsock.ko so that the vsock_diag.ko module will be able to traverse sockets. Signed-off-by: Stefan Hajnoczi --- include/net/af_vsock.h | 5 + net/vmw_vsock/af_vsock.c | 10 ++ 2 files changed, 11 insertions(+), 4 deletions(-) diff

[PATCH v2 4/5] VSOCK: add sock_diag interface

2017-10-04 Thread Stefan Hajnoczi
extending vsock_diag_dump() if needed by VMCI users. Signed-off-by: Stefan Hajnoczi --- MAINTAINERS | 2 + net/vmw_vsock/Makefile | 3 + include/uapi/linux/vm_sockets_diag.h | 33 +++ net/vmw_vsock/diag.c | 186

[PATCH v2 2/5] VSOCK: move __vsock_in_bound/connected_table() to af_vsock.h

2017-10-04 Thread Stefan Hajnoczi
The vsock_diag.ko module will need to check socket table membership. Signed-off-by: Stefan Hajnoczi --- include/net/af_vsock.h | 12 net/vmw_vsock/af_vsock.c | 10 -- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/include/net/af_vsock.h b/include/net

[PATCH v2 3/5] VSOCK: use TCP state constants for sk_state

2017-10-04 Thread Stefan Hajnoczi
P_CLOSING VSOCK_SS_LISTEN -> TCP_LISTEN In __vsock_create() the sk_state initialization was dropped because sock_init_data() already initializes sk_state to TCP_CLOSE. Signed-off-by: Stefan Hajnoczi --- include/net/af_vsock.h | 3 -- net/vmw_vsock/af_vs

[PATCH v2 5/5] VSOCK: add tools/testing/vsock/vsock_diag_test

2017-10-04 Thread Stefan Hajnoczi
future. Signed-off-by: Stefan Hajnoczi --- MAINTAINERS | 1 + tools/testing/vsock/Makefile | 9 + tools/testing/vsock/control.h | 13 + tools/testing/vsock/timeout.h | 14 + tools/testing/vsock/control.c | 219 +++ tools

Re: [PATCH 0/5] VSOCK: add vsock_test test suite

2018-01-02 Thread Stefan Hajnoczi
On Wed, Dec 20, 2017 at 02:48:43PM +, Jorgen S. Hansen wrote: > > > On Dec 13, 2017, at 3:49 PM, Stefan Hajnoczi wrote: > > > > The vsock_diag.ko module already has a test suite but the core AF_VSOCK > > functionality has no tests. This patch series a

Re: [PATCH net] VSOCK: check sk state before receive

2018-05-30 Thread Stefan Hajnoczi
On Sun, May 27, 2018 at 11:29:45PM +0800, Hangbin Liu wrote: > Hmm...Although I won't reproduce this bug with my reproducer after > apply my patch. I could still get a similiar issue with syzkaller sock vnet > test. > > It looks this patch is not complete. Here is the KASAN call trace with my >

Re: [PATCH] vsock/virtio: annotate 'the_virtio_vsock' RCU pointer

2020-07-13 Thread Stefan Hajnoczi
vsock [noderef] > __rcu * > net/vmw_vsock/virtio_transport.c:631:9:struct virtio_vsock * > > Fixes: 0deab087b16a ("vsock/virtio: use RCU to avoid use-after-free on > the_virtio_vsock") > Reported-by: Michael S. Tsirkin > Signed-off-by: Stefano Garzarella >

Re: [PATCH] vhost/scsi: fix up req type endian-ness

2020-07-13 Thread Stefan Hajnoczi
kernel.org > Signed-off-by: Michael S. Tsirkin > --- > drivers/vhost/scsi.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Stefan Hajnoczi signature.asc Description: PGP signature

Re: [RFC PATCH 00/24] Control VQ support in vDPA

2020-09-24 Thread Stefan Hajnoczi
On Thu, Sep 24, 2020 at 11:21:01AM +0800, Jason Wang wrote: > This series tries to add the support for control virtqueue in vDPA. Please include documentation for both driver authors and vhost-vdpa ioctl users. vhost-vdpa ioctls are only documented with a single sentence. Please add full informati

[PATCH] vhost/vsock: fix reset orphans race with close timeout

2018-12-06 Thread Stefan Hajnoczi
_DONE flag. Check if the close timer is pending and let it close the socket. This prevents the race which can leak sockets. Reported-by: Maximilian Riemensberger Cc: Graham Whaley Signed-off-by: Stefan Hajnoczi --- drivers/vhost/vsock.c | 22 +++--- 1 file changed, 15 inser

Re: [PATCH] Fix ERROR:do not initialise statics to 0 in af_vsock.c

2019-01-10 Thread Stefan Hajnoczi
struct sockaddr_vm *addr) > { > - static u32 port = 0; > + static u32 port; Reviewed-by: Stefan Hajnoczi signature.asc Description: PGP signature

Re: [PATCH net] vhost: fix OOB in get_rx_bufs()

2019-01-28 Thread Stefan Hajnoczi
/scsi.c | 2 +- > drivers/vhost/vhost.c | 7 --- > drivers/vhost/vhost.h | 4 +++- > drivers/vhost/vsock.c | 2 +- > 5 files changed, 11 insertions(+), 7 deletions(-) No change in the scsi and vsock cases. I haven't reviewed the net case. Acked-by: Stefan Hajnoczi signature.asc Description: PGP signature

Re: [PATCH RFC v2 0/2] vsock/virtio: fix issues on device hot-unplug

2019-02-01 Thread Stefan Hajnoczi
On Tue, Jan 29, 2019 at 04:33:58PM +0100, Stefano Garzarella wrote: > Kindly ping :) Hi Stefano, It probably didn't get picked up due to the "RFC" (Request for Comments). I suggest rebasing, retesting, and resending to be sure it will be noticed and merged without conflicts. Stefan signature.a

Re: [PATCH RFC 1/2] vsock/virtio: fix kernel panic after device hot-unplug

2019-01-02 Thread Stefan Hajnoczi
On Thu, Dec 20, 2018 at 01:15:34PM +0100, Stefano Garzarella wrote: > diff --git a/net/vmw_vsock/virtio_transport.c > b/net/vmw_vsock/virtio_transport.c > index 5d3cce9e8744..9dae54698737 100644 > --- a/net/vmw_vsock/virtio_transport.c > +++ b/net/vmw_vsock/virtio_transport.c > @@ -75,6 +75,9 @@ s

Re: [PATCH RFC 2/2] vsock/virtio: reset connected sockets on device removal

2019-01-02 Thread Stefan Hajnoczi
t; 1 file changed, 3 insertions(+) Reviewed-by: Stefan Hajnoczi signature.asc Description: PGP signature

Re: [PATCH RFC 1/2] vsock/virtio: fix kernel panic after device hot-unplug

2019-01-03 Thread Stefan Hajnoczi
On Wed, Jan 02, 2019 at 11:01:27AM +0100, Stefano Garzarella wrote: > On Wed, Jan 2, 2019 at 10:39 AM Stefan Hajnoczi wrote: > > > > On Thu, Dec 20, 2018 at 01:15:34PM +0100, Stefano Garzarella wrote: > > > diff --git a/net/vmw_vsock/virtio_transport.c > > > b

Re: [PATCH RFC 1/2] vsock/virtio: fix kernel panic after device hot-unplug

2019-01-04 Thread Stefan Hajnoczi
On Thu, Jan 03, 2019 at 03:09:39PM +0100, Stefano Garzarella wrote: > On Thu, Jan 3, 2019 at 11:03 AM Stefan Hajnoczi wrote: > > > > On Wed, Jan 02, 2019 at 11:01:27AM +0100, Stefano Garzarella wrote: > > > On Wed, Jan 2, 2019 at 10:39 AM Stefan Hajnoczi > > > w

Re: [PATCH RFC 0/2] vsock/virtio: fix issues on device hot-unplug

2019-01-04 Thread Stefan Hajnoczi
2.19.2 > Fine in the current model. Once we tackle nested virtualization (two transports at once) we'll have to revisit this. Acked-by: Stefan Hajnoczi signature.asc Description: PGP signature

Re: [PATCH] vhost/vsock: fix vhost vsock cid hashing inconsistent

2019-01-08 Thread Stefan Hajnoczi
by: Zha Bin > Reviewed-by: Liu Jiang > --- > drivers/vhost/vsock.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Thanks for tracking this down! Reviewed-by: Stefan Hajnoczi signature.asc Description: PGP signature

Re: [RFC] VSOCK: About Virtio-vsock support "Multiqueue" feature ?

2018-11-29 Thread Stefan Hajnoczi
On Mon, Oct 08, 2018 at 03:06:43PM +0800, jiangyiwen wrote: > Hi Stefan & All: > > Now virtio-vsock only supports two vqs(tx and rx), that means > if multiple sockets in the guest will use the same vq to transmit > the message and get the response. In this way, the bandwidth will > be limited to ~

Re: [PATCH 0/5] VSOCK: support mergeable rx buffer in vhost-vsock

2018-11-29 Thread Stefan Hajnoczi
On Tue, Nov 06, 2018 at 01:53:54PM +0800, jiangyiwen wrote: > On 2018/11/6 11:32, Jason Wang wrote: > > > > On 2018/11/6 上午11:17, jiangyiwen wrote: > >> On 2018/11/6 10:41, Jason Wang wrote: > >>> On 2018/11/6 上午10:17, jiangyiwen wrote: > On 2018/11/5 17:21, Jason Wang wrote: > > On 2018/

Re: [PATCH] VSOCK: bind to random port for VMADDR_PORT_ANY

2018-12-11 Thread Stefan Hajnoczi
On Mon, Dec 10, 2018 at 11:02:35PM -0800, Lepton Wu wrote: > The old code always starts from fixed port for VMADDR_PORT_ANY. Sometimes > when VMM crashed, there is still orphaned vsock which is waiting for > close timer, then it could cause connection time out for new started VM > if they are tryin

Re: [PATCH v2 5/5] VSOCK: batch sending rx buffer to increase bandwidth

2018-12-13 Thread Stefan Hajnoczi
On Wed, Dec 12, 2018 at 05:35:27PM +0800, jiangyiwen wrote: > Batch sending rx buffer can improve total bandwidth. > > Signed-off-by: Yiwen Jiang > --- Please send patches with git-send-email --thread --no-chain-reply-to so that your patch series email thread looks like this: * [PATCH 00/NN]

Re: [PATCH v2 2/5] VSOCK: support fill data to mergeable rx buffer in host

2018-12-13 Thread Stefan Hajnoczi
On Thu, Dec 13, 2018 at 03:42:33PM +0800, jiangyiwen wrote: > On 2018/12/13 13:59, David Miller wrote: > > From: jiangyiwen > > Date: Thu, 13 Dec 2018 11:11:48 +0800 > > > >> I hope Host can fill fewer bytes into rx virtqueue, so > >> I keep structure virtio_vsock_mrg_rxbuf_hdr one byte > >> alig

  1   2   3   4   >