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: [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: 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: 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: [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: 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] 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 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 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] 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-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 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] 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: [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

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: [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: [RFC v9 09/11] vhost/scsi: switch to buf APIs

2020-06-22 Thread Stefan Hajnoczi
gt; + } else > pr_err("Faulted on virtio_scsi_ctrl_tmf_resp\n"); > } The curly brackets are not necessary, but the patch still looks fine: Reviewed-by: Stefan Hajnoczi signature.asc Description: PGP signature

Re: [RFC v9 10/11] vhost/vsock: switch to the buf API

2020-06-22 Thread Stefan Hajnoczi
> 1 file changed, 18 insertions(+), 12 deletions(-) Reviewed-by: Stefan Hajnoczi signature.asc Description: PGP signature

Re: [PATCH RFC v5 12/13] vhost/vsock: switch to the buf API

2020-06-08 Thread Stefan Hajnoczi
On Sun, Jun 07, 2020 at 10:11:49AM -0400, Michael S. Tsirkin wrote: > A straight-forward conversion. > > Signed-off-by: Michael S. Tsirkin > --- > drivers/vhost/vsock.c | 30 ++ > 1 file changed, 18 insertions(+), 12 deletions(-) Reviewed-b

Re: [PATCH RFC v5 11/13] vhost/scsi: switch to buf APIs

2020-06-08 Thread Stefan Hajnoczi
ers/vhost/scsi.c | 73 ++-- > 1 file changed, 44 insertions(+), 29 deletions(-) Reviewed-by: Stefan Hajnoczi signature.asc Description: PGP signature

Re: [PATCH RFC 12/13] vhost/vsock: switch to the buf API

2020-06-05 Thread Stefan Hajnoczi
On Tue, Jun 02, 2020 at 09:06:22AM -0400, Michael S. Tsirkin wrote: > A straight-forward conversion. > > Signed-off-by: Michael S. Tsirkin > --- > drivers/vhost/vsock.c | 30 ++ > 1 file changed, 18 insertions(+), 12 deletions(-) Reviewed-b

Re: [PATCH RFC 11/13] vhost/scsi: switch to buf APIs

2020-06-05 Thread Stefan Hajnoczi
c compliant and guest drivers might be happier (especially drivers for niche OSes that were only tested against QEMU's virtio-scsi). On the other hand, it's a guest-visible change that could break similar niche drivers that assume length is always 0. I'd leave it as-is unless people hit issues that justify the risk of changing it. Reviewed-by: Stefan Hajnoczi signature.asc Description: PGP signature

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: [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 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: [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 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

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] 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 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 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] 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] 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: [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 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 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 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-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 v2 0/5] VSOCK: support mergeable rx buffer in vhost-vsock

2018-12-13 Thread Stefan Hajnoczi
On Wed, Dec 12, 2018 at 05:25:50PM +0800, jiangyiwen wrote: > Now vsock only support send/receive small packet, it can't achieve > high performance. As previous discussed with Jason Wang, I revisit the > idea of vhost-net about mergeable rx buffer and implement the mergeable > rx buffer in vhost-vs

Re: [PATCH v2 3/5] VSOCK: support receive mergeable rx buffer in guest

2018-12-13 Thread Stefan Hajnoczi
On Wed, Dec 12, 2018 at 05:31:39PM +0800, jiangyiwen wrote: > +static struct virtio_vsock_pkt *receive_mergeable(struct virtqueue *vq, > + struct virtio_vsock *vsock, unsigned int *total_len) > +{ > + struct virtio_vsock_pkt *pkt; > + u16 num_buf; > + void *buf; > + unsi

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 11:08:04AM +0800, jiangyiwen wrote: > On 2018/12/12 23:37, Michael S. Tsirkin wrote: > > On Wed, Dec 12, 2018 at 05:29:31PM +0800, jiangyiwen wrote: > >> When vhost support VIRTIO_VSOCK_F_MRG_RXBUF feature, > >> it will merge big packet into rx vq. > >> > >> Signed-off-by: Y

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

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] 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

[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 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: [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 net V2] vhost-vsock: fix use after free

2018-09-27 Thread Stefan Hajnoczi
gt; > Reported-by: syzbot+e3e074963495f92a8...@syzkaller.appspotmail.com > Fixes: 16320f363ae1 ("vhost-vsock: add pkt cancel capability") > Fixes: 433fc58e6bf2 ("VSOCK: Introduce vhost_vsock.ko") > Cc: Stefan Hajnoczi > Signed-off-by: Jason Wang > -

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: 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

[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/

[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 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 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

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

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] &

[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

[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

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) &

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: 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-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: [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 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: [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] vsock.7: document VSOCK socket address family

2018-02-01 Thread Stefan Hajnoczi
On Tue, Jan 30, 2018 at 10:31:54PM +0100, Michael Kerrisk (man-pages) wrote: > Hi Stefan, > > Ping on the below please, since it either blocks the man-pages release > I'd currently like to make, or I must remove the vsock.7 page for this > release. Sorry for the delay. The verbatim license is fi

[PATCH] VSOCK: set POLLOUT | POLLWRNORM for TCP_CLOSING

2018-01-26 Thread Stefan Hajnoczi
() only sets POLLOUT | POLLWRNORM for TCP_CLOSE, not the TCP_CLOSING state that the socket is in when the shutdown is received. Signed-off-by: Stefan Hajnoczi --- net/vmw_vsock/af_vsock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/vmw_vsock/af_vsock.c b/net/vmw_vsock

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 2/5] VSOCK: extract connect/accept functions from vsock_diag_test.c

2017-12-14 Thread Stefan Hajnoczi
On Wed, Dec 13, 2017 at 04:32:58PM -0500, David Miller wrote: > From: Stefan Hajnoczi > Date: Wed, 13 Dec 2017 14:49:08 + > > > +#include > > +#include "../../../include/uapi/linux/vm_sockets.h" > > + > ... > > -#include "../.

Re: AF_VSOCK connection refused errno

2017-12-13 Thread Stefan Hajnoczi
On Wed, Dec 13, 2017 at 10:28:30AM +, Jorgen S. Hansen wrote: > > > On Dec 12, 2017, at 4:53 PM, Stefan Hajnoczi wrote: > > > > When connect(2) fails because the peer is not listening the virtio vsock > > transport returns ECONNRESET. I believe the VMCI transpo

[PATCH 1/5] VSOCK: extract utility functions from vsock_diag_test.c

2017-12-13 Thread Stefan Hajnoczi
Move useful functions into a separate file in preparation for more vsock test programs. Signed-off-by: Stefan Hajnoczi --- tools/testing/vsock/Makefile | 2 +- tools/testing/vsock/util.h| 35 + tools/testing/vsock/util.c| 70

[PATCH 4/5] VSOCK: add send_byte()/recv_byte() test utilities

2017-12-13 Thread Stefan Hajnoczi
Test cases will want to transfer data. This patch adds utility functions to do this. Signed-off-by: Stefan Hajnoczi --- tools/testing/vsock/util.h | 2 + tools/testing/vsock/util.c | 99 ++ 2 files changed, 101 insertions(+) diff --git a/tools

[PATCH 3/5] VSOCK: add full barrier between test cases

2017-12-13 Thread Stefan Hajnoczi
See code comment for details. Signed-off-by: Stefan Hajnoczi --- tools/testing/vsock/util.c | 18 -- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/tools/testing/vsock/util.c b/tools/testing/vsock/util.c index 75a78f295b37..2be923fe9922 100644 --- a/tools/testing

[PATCH 5/5] VSOCK: add AF_VSOCK test cases

2017-12-13 Thread Stefan Hajnoczi
The vsock_test.c program runs a test suite of AF_VSOCK test cases. Signed-off-by: Stefan Hajnoczi --- tools/testing/vsock/Makefile | 5 +- tools/testing/vsock/vsock_test.c | 321 +++ tools/testing/vsock/.gitignore | 1 + tools/testing/vsock/README

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

2017-12-13 Thread Stefan Hajnoczi
/testing/vsock/README for information on how to run the test suite. Dexuan: I'm not sure if this test suite is useful for the Hyper-V transport since the host is Windows and uses a different API for AF_HYPERV? Stefan Hajnoczi (5): VSOCK: extract utility functions from vsock_diag_test.c

[PATCH 2/5] VSOCK: extract connect/accept functions from vsock_diag_test.c

2017-12-13 Thread Stefan Hajnoczi
Many test cases will need to connect to the server or accept incoming connections. This patch extracts these operations into utility functions that can be reused. Signed-off-by: Stefan Hajnoczi --- tools/testing/vsock/util.h| 6 ++ tools/testing/vsock/util.c| 108

AF_VSOCK connection refused errno

2017-12-12 Thread Stefan Hajnoczi
When connect(2) fails because the peer is not listening the virtio vsock transport returns ECONNRESET. I believe the VMCI transport does the same (based on code inspection). Jorgen: Can you confirm this VMCI transport behavior? I'd like to change to ECONNREFUSED for all transports because develo

Re: [PATCH v2] vsock.7: document VSOCK socket address family

2017-12-12 Thread Stefan Hajnoczi
On Mon, Dec 11, 2017 at 08:32:20PM +0100, Michael Kerrisk (man-pages) wrote: > On 12/05/2017 11:56 AM, Stefan Hajnoczi wrote: > > +Data is transferred using the usual > > +.BR send (2) > > +and > > +.BR recv (2) > > Or equally, write(2) and read(2), right? By fai

[PATCH] VSOCK: fix outdated sk_state value in hvs_release()

2017-12-05 Thread Stefan Hajnoczi
the SS_DISCONNECTING constant. This patch replaces the old SS_DISCONNECTING with the new TCP_CLOSING constant. CC: Dexuan Cui CC: Cathy Avery Signed-off-by: Stefan Hajnoczi --- net/vmw_vsock/hyperv_transport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/vmw_vsock/hype

[PATCH v2] vsock.7: document VSOCK socket address family

2017-12-05 Thread Stefan Hajnoczi
The AF_VSOCK address family has been available since Linux 3.9 without a corresponding man page. This patch adds vsock.7 and describes its use along the same lines as existing ip.7, unix.7, and netlink.7 man pages. CC: Jorgen Hansen CC: Dexuan Cui Signed-off-by: Stefan Hajnoczi --- man7

Re: [PATCH] vsock.7: document VSOCK socket address family

2017-12-02 Thread Stefan Hajnoczi
On Fri, Dec 01, 2017 at 09:57:04AM -0500, G. Branden Robinson wrote: > At 2017-12-01T13:09:01+0000, Stefan Hajnoczi wrote: > > On Thu, Nov 30, 2017 at 01:21:26PM +, Jorgen S. Hansen wrote: > > > > On Nov 30, 2017, at 12:21 PM, Stefan Hajnoczi > > > > wro

Re: [PATCH] vsock.7: document VSOCK socket address family

2017-12-01 Thread Stefan Hajnoczi
On Thu, Nov 30, 2017 at 01:21:26PM +, Jorgen S. Hansen wrote: > > On Nov 30, 2017, at 12:21 PM, Stefan Hajnoczi wrote: Thanks for the quick review! I forgot to ask you: Is SOCK_DGRAM reliable and in-order over VMCI? > > +.PP > > +Valid socket types are > > +.B SOCK

[PATCH] vsock.7: document VSOCK socket address family

2017-11-30 Thread Stefan Hajnoczi
The AF_VSOCK address family has been available since Linux 3.9 without a corresponding man page. This patch adds vsock.7 and describes its use along the same lines as existing ip.7, unix.7, and netlink.7 man pages. CC: Jorgen Hansen CC: Dexuan Cui Signed-off-by: Stefan Hajnoczi --- man7

Re: [PATCH] VSOCK: Don't set sk_state to TCP_CLOSE before testing it

2017-11-28 Thread Stefan Hajnoczi
_SYN_SENT. This change moves the > sk_state change back to the original locations in that function. > > Signed-off-by: Jorgen Hansen > --- > net/vmw_vsock/vmci_transport.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) Sorry, silly bug on my part! Reviewed-by:

Re: [PATCH] uapi: add SPDX identifier to vm_sockets_diag.h

2017-11-24 Thread Stefan Hajnoczi
On Fri, Nov 24, 2017 at 8:08 PM, Stephen Hemminger wrote: > New file seems to have missed the SPDX license scan and update. > > Signed-off-by: Stephen Hemminger > --- > include/uapi/linux/vm_sockets_diag.h | 1 + > 1 file changed, 1 insertion(+) Reviewed-by: Stefan Hajnoczi

Re: [PATCH] VSOCK: Don't call vsock_stream_has_data in atomic context

2017-11-23 Thread Stefan Hajnoczi
: Aditya Sarwade > Signed-off-by: Jorgen Hansen > --- > net/vmw_vsock/vmci_transport.c | 10 +++--- > 1 files changed, 7 insertions(+), 3 deletions(-) Reviewed-by: Stefan Hajnoczi

Re: [Patch net-next] vsock: always call vsock_init_tables()

2017-10-26 Thread Stefan Hajnoczi
sh kernel on uninitialized > vsock_bind_table. > > This patch fixes it by moving vsock_init_tables() to its own > module_init(). > > Fixes: 413a4317aca7 ("VSOCK: add sock_diag interface") > Reported-by: syzkaller bot > Cc: Stefan Hajnoczi > Cc: Jorgen Hansen &

Re: BUG: unable to handle kernel paging request in vsock_diag_dump

2017-10-26 Thread Stefan Hajnoczi
On Tue, Oct 24, 2017 at 08:14:01AM -0700, syzbot wrote: > Hello, > > syzkaller hit the following crash on > 28f50eb20931f32a2ceeb6aba8fa2cd5ca96ad9f > git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git/master > compiler: gcc (GCC) 7.1.1 20170620 > .config is attached > Raw console ou

Re: BUG: unable to handle kernel paging request in vsock_diag_dump

2017-10-26 Thread Stefan Hajnoczi
On Tue, Oct 24, 2017 at 08:14:01AM -0700, syzbot wrote: > Hello, > > syzkaller hit the following crash on > 28f50eb20931f32a2ceeb6aba8fa2cd5ca96ad9f > git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git/master > compiler: gcc (GCC) 7.1.1 20170620 > .config is attached > Raw console ou

[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'

[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 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 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 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 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 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 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 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

  1   2   3   4   >