Re: [CFT][PATCH v3] fork, vhost: Use CLONE_THREAD to fix freezer/ps regression

2023-06-06 Thread Mike Christie
On 6/6/23 2:39 PM, Oleg Nesterov wrote: > On 06/06, Mike Christie wrote: >> >> On 6/6/23 7:16 AM, Oleg Nesterov wrote: >>> On 06/05, Mike Christie wrote: >>> So it works like if we were using a kthread still: 1. Userapce thread0 opens /dev/vhost-$something. 2. thread0 does

Re: [CFT][PATCH v3] fork, vhost: Use CLONE_THREAD to fix freezer/ps regression

2023-06-06 Thread Oleg Nesterov
On 06/06, Mike Christie wrote: > > On 6/6/23 7:16 AM, Oleg Nesterov wrote: > > On 06/05, Mike Christie wrote: > > > >> So it works like if we were using a kthread still: > >> > >> 1. Userapce thread0 opens /dev/vhost-$something. > >> 2. thread0 does VHOST_SET_OWNER ioctl. This calls

Re: [PATCH 1/1] vhost: Fix crash during early vhost_transport_send_pkt calls

2023-06-06 Thread Mike Christie
On 6/6/23 2:22 PM, Michael S. Tsirkin wrote: > On Tue, Jun 06, 2023 at 12:19:10PM -0500, Mike Christie wrote: >> On 6/6/23 4:49 AM, Stefano Garzarella wrote: >>> On Mon, Jun 05, 2023 at 01:57:30PM -0500, Mike Christie wrote: If userspace does VHOST_VSOCK_SET_GUEST_CID before VHOST_SET_OWNER

Re: [PATCH] vp_vdpa: Check queue number of vdpa device from add_config

2023-06-06 Thread Jason Wang
On Tue, Jun 6, 2023 at 2:19 PM Angus Chen wrote: > > Hi,Jason. > > > -Original Message- > > From: Jason Wang > > Sent: Monday, June 5, 2023 2:54 PM > > To: Angus Chen > > Cc: m...@redhat.com; virtualization@lists.linux-foundation.org; > > linux-ker...@vger.kernel.org > > Subject: Re:

Re: [CFT][PATCH v3] fork, vhost: Use CLONE_THREAD to fix freezer/ps regression

2023-06-06 Thread Mike Christie
On 6/6/23 7:16 AM, Oleg Nesterov wrote: > On 06/05, Mike Christie wrote: >> >> On 6/5/23 10:10 AM, Oleg Nesterov wrote: >>> On 06/03, michael.chris...@oracle.com wrote: On 6/2/23 11:15 PM, Eric W. Biederman wrote: The problem is that as part of the flush the drivers/vhost/scsi.c

Re: [PATCH 1/1] vhost: Fix crash during early vhost_transport_send_pkt calls

2023-06-06 Thread Michael S. Tsirkin
On Tue, Jun 06, 2023 at 12:19:10PM -0500, Mike Christie wrote: > On 6/6/23 4:49 AM, Stefano Garzarella wrote: > > On Mon, Jun 05, 2023 at 01:57:30PM -0500, Mike Christie wrote: > >> If userspace does VHOST_VSOCK_SET_GUEST_CID before VHOST_SET_OWNER we > >> can race where: > >> 1. thread0 calls

Re: [PATCH 1/1] vhost: Fix crash during early vhost_transport_send_pkt calls

2023-06-06 Thread Mike Christie
On 6/6/23 4:49 AM, Stefano Garzarella wrote: > On Mon, Jun 05, 2023 at 01:57:30PM -0500, Mike Christie wrote: >> If userspace does VHOST_VSOCK_SET_GUEST_CID before VHOST_SET_OWNER we >> can race where: >> 1. thread0 calls vhost_transport_send_pkt -> vhost_work_queue >> 2. thread1 does

Re: [PATCH net] virtio_net: use control_buf for coalesce params

2023-06-06 Thread Michael S. Tsirkin
On Mon, Jun 05, 2023 at 12:59:25PM -0700, Brett Creeley wrote: > Commit 699b045a8e43 ("net: virtio_net: notifications coalescing > support") added coalescing command support for virtio_net. However, > the coalesce commands are using buffers on the stack, which is causing > the device to see DMA

Re: [PATCH 1/1] vhost: Fix crash during early vhost_transport_send_pkt calls

2023-06-06 Thread Stefano Garzarella
On Mon, Jun 05, 2023 at 01:57:30PM -0500, Mike Christie wrote: If userspace does VHOST_VSOCK_SET_GUEST_CID before VHOST_SET_OWNER we can race where: 1. thread0 calls vhost_transport_send_pkt -> vhost_work_queue 2. thread1 does VHOST_SET_OWNER which calls vhost_worker_create. 3.

Re: [PATCH] vhost-vdpa: filter VIRTIO_F_RING_PACKED feature

2023-06-06 Thread Stefano Garzarella
On Mon, Jun 05, 2023 at 05:44:50PM -0400, Michael S. Tsirkin wrote: On Mon, Jun 05, 2023 at 04:56:37PM +0200, Stefano Garzarella wrote: On Mon, Jun 05, 2023 at 09:54:57AM -0400, Michael S. Tsirkin wrote: > On Mon, Jun 05, 2023 at 03:30:35PM +0200, Stefano Garzarella wrote: > > On Mon, Jun 05,

Re: [PATCH] vhost-vdpa: filter VIRTIO_F_RING_PACKED feature

2023-06-06 Thread Stefano Garzarella
On Tue, Jun 06, 2023 at 09:29:22AM +0800, Jason Wang wrote: On Mon, Jun 5, 2023 at 10:58 PM Stefano Garzarella wrote: On Mon, Jun 05, 2023 at 09:54:57AM -0400, Michael S. Tsirkin wrote: >On Mon, Jun 05, 2023 at 03:30:35PM +0200, Stefano Garzarella wrote: >> On Mon, Jun 05, 2023 at 09:00:25AM

Re: [CFT][PATCH v3] fork, vhost: Use CLONE_THREAD to fix freezer/ps regression

2023-06-06 Thread Oleg Nesterov
On 06/05, Mike Christie wrote: > > On 6/5/23 10:10 AM, Oleg Nesterov wrote: > > On 06/03, michael.chris...@oracle.com wrote: > >> > >> On 6/2/23 11:15 PM, Eric W. Biederman wrote: > >> The problem is that as part of the flush the drivers/vhost/scsi.c code > >> will wait for outstanding commands,

Re: [PATCH] vhost-vdpa: filter VIRTIO_F_RING_PACKED feature

2023-06-06 Thread Michael S. Tsirkin
On Tue, Jun 06, 2023 at 09:29:22AM +0800, Jason Wang wrote: > On Mon, Jun 5, 2023 at 10:58 PM Stefano Garzarella > wrote: > > > > On Mon, Jun 05, 2023 at 09:54:57AM -0400, Michael S. Tsirkin wrote: > > >On Mon, Jun 05, 2023 at 03:30:35PM +0200, Stefano Garzarella wrote: > > >> On Mon, Jun 05,