Re: [syzbot] [kvm?] [net?] [virt?] general protection fault in vhost_work_queue

2023-05-30 Thread Michael S. Tsirkin
On Tue, May 30, 2023 at 12:30:06AM -0700, syzbot wrote: > Hello, > > syzbot found the following issue on: > > HEAD commit:933174ae28ba Merge tag 'spi-fix-v6.4-rc3' of git://git.ker.. > git tree: upstream > console output: https://syzkaller.appspot.com/x/log.txt?x=138d4ae528 >

Re: [PATCH v1] virtio-pci: Improve code style for including header files

2023-05-30 Thread Michael S. Tsirkin
On Mon, May 29, 2023 at 02:17:29PM -0400, Feng Liu wrote: > Fix code style related to including header file. Include header files > before declaring macro definitions to avoid conflicts. > > Signed-off-by: Feng Liu > Reviewed-by: Jiri Pirko Which conflicts? These macros are there precisely to

Re: vhost stable branch

2023-05-30 Thread Dragos Tatulea via Virtualization
On Tue, 2023-05-23 at 07:45 -0400, Michael S. Tsirkin wrote: > On Tue, May 23, 2023 at 08:38:47AM +, Dragos Tatulea wrote: > > On Tue, 2023-05-23 at 04:18 -0400, Michael S. Tsirkin wrote: > > > On Tue, May 23, 2023 at 07:16:58AM +, Dragos Tatulea wrote: > > > > Hi, > > > > > > > > I am

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

2023-05-30 Thread Eric W. Biederman
"Eric W. Biederman" writes: > Linus Torvalds writes: > >> So I'd really like to finish this. Even if we end up with a hack or >> two in signal handling that we can hopefully fix up later by having >> vhost fix up some of its current assumptions. > > > The real sticky widget for me is how to

Re: [PATCH v1] virtio-pci: Improve code style for including header files

2023-05-30 Thread Feng Liu via Virtualization
On 2023-05-30 a.m.7:27, Michael S. Tsirkin wrote: External email: Use caution opening links or attachments On Mon, May 29, 2023 at 02:17:29PM -0400, Feng Liu wrote: Fix code style related to including header file. Include header files before declaring macro definitions to avoid conflicts.

Re: [syzbot] [kvm?] [net?] [virt?] general protection fault in vhost_work_queue

2023-05-30 Thread Stefano Garzarella
On Tue, May 30, 2023 at 3:44 PM Stefano Garzarella wrote: > > On Tue, May 30, 2023 at 1:24 PM Michael S. Tsirkin wrote: > > > > On Tue, May 30, 2023 at 12:30:06AM -0700, syzbot wrote: > > > Hello, > > > > > > syzbot found the following issue on: > > > > > > HEAD commit:933174ae28ba Merge tag

Re: [syzbot] [kvm?] [net?] [virt?] general protection fault in vhost_work_queue

2023-05-30 Thread Mike Christie
On 5/30/23 11:00 AM, Stefano Garzarella wrote: > I think it is partially related to commit 6e890c5d5021 ("vhost: use > vhost_tasks for worker threads") and commit 1a5f8090c6de ("vhost: move > worker thread fields to new struct"). Maybe that commits just > highlighted the issue and it was already

Re: [syzbot] [kvm?] [net?] [virt?] general protection fault in vhost_work_queue

2023-05-30 Thread Stefano Garzarella
On Tue, May 30, 2023 at 1:24 PM Michael S. Tsirkin wrote: > > On Tue, May 30, 2023 at 12:30:06AM -0700, syzbot wrote: > > Hello, > > > > syzbot found the following issue on: > > > > HEAD commit:933174ae28ba Merge tag 'spi-fix-v6.4-rc3' of git://git.ker.. > > git tree: upstream > >

Re: [PATCH v1] virtio-pci: Improve code style for including header files

2023-05-30 Thread Michael S. Tsirkin
On Tue, May 30, 2023 at 10:07:23AM -0400, Feng Liu wrote: > > > On 2023-05-30 a.m.7:27, Michael S. Tsirkin wrote: > > External email: Use caution opening links or attachments > > > > > > On Mon, May 29, 2023 at 02:17:29PM -0400, Feng Liu wrote: > > > Fix code style related to including header

Re: [syzbot] [kvm?] [net?] [virt?] general protection fault in vhost_work_queue

2023-05-30 Thread Mike Christie
On 5/30/23 8:44 AM, Stefano Garzarella wrote: > > From a first glance, it looks like an issue when we call vhost_work_queue(). > @Mike, does that ring any bells since you recently looked at that code? I see the bug. needed to have set the dev->worker after setting worker->vtsk like below: diff

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

2023-05-30 Thread Mike Christie
On 5/29/23 9:38 PM, Eric W. Biederman wrote: > Mike is there any chance you can test the change below? Yeah, I'm firing up tests now. ___ Virtualization mailing list Virtualization@lists.linux-foundation.org

Re: [syzbot] [kvm?] [net?] [virt?] general protection fault in vhost_work_queue

2023-05-30 Thread Stefano Garzarella
On Tue, May 30, 2023 at 11:01:11AM -0500, Mike Christie wrote: On 5/30/23 10:58 AM, Mike Christie wrote: On 5/30/23 8:44 AM, Stefano Garzarella wrote: From a first glance, it looks like an issue when we call vhost_work_queue(). @Mike, does that ring any bells since you recently looked at that

Re: [syzbot] [kvm?] [net?] [virt?] general protection fault in vhost_work_queue

2023-05-30 Thread Stefano Garzarella
On Tue, May 30, 2023 at 11:09:09AM -0500, Mike Christie wrote: On 5/30/23 11:00 AM, Stefano Garzarella wrote: I think it is partially related to commit 6e890c5d5021 ("vhost: use vhost_tasks for worker threads") and commit 1a5f8090c6de ("vhost: move worker thread fields to new struct"). Maybe

Re: [syzbot] [kvm?] [net?] [virt?] general protection fault in vhost_work_queue

2023-05-30 Thread Mike Christie
On 5/30/23 10:58 AM, Mike Christie wrote: > On 5/30/23 8:44 AM, Stefano Garzarella wrote: >> >> From a first glance, it looks like an issue when we call vhost_work_queue(). >> @Mike, does that ring any bells since you recently looked at that code? > > I see the bug. needed to have set the

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

2023-05-30 Thread Mike Christie
On 5/29/23 9:38 PM, Eric W. Biederman wrote: > diff --git a/kernel/vhost_task.c b/kernel/vhost_task.c > index b7cbd66f889e..f3ce0fa6edd7 100644 > --- a/kernel/vhost_task.c > +++ b/kernel/vhost_task.c ... > static int vhost_task_fn(void *data) > { > struct vhost_task *vtsk = data; > -

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

2023-05-30 Thread Jason Wang
在 2023/5/23 23:57, Eric W. Biederman 写道: Oleg Nesterov writes: On 05/22, Oleg Nesterov wrote: Right now I think that "int dead" should die, No, probably we shouldn't call get_signal() if we have already dequeued SIGKILL. Very much agreed. It is one thing to add a patch to move do_exit

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

2023-05-30 Thread Jason Wang
在 2023/5/23 20:15, Oleg Nesterov 写道: On 05/22, Oleg Nesterov wrote: Right now I think that "int dead" should die, No, probably we shouldn't call get_signal() if we have already dequeued SIGKILL. but let me think tomorrow. May be something like this... I don't like it but I can't suggest

Re: [PATCH] virtio_ring: validate used buffer length

2023-05-30 Thread Michael S. Tsirkin
On Wed, May 31, 2023 at 09:05:00AM +0800, Jason Wang wrote: > On Mon, May 29, 2023 at 6:03 PM Michael S. Tsirkin wrote: > > > > On Mon, May 29, 2023 at 09:18:10AM +0800, Jason Wang wrote: > > > On Sun, May 28, 2023 at 3:57 PM Michael S. Tsirkin > > > wrote: > > > > > > > > On Fri, May 26, 2023

Re: [PATCH] vduse: avoid empty string for dev name

2023-05-30 Thread Jason Wang
On Tue, May 30, 2023 at 11:37 AM Sheng Zhao wrote: > > Syzkaller hits a kernel WARN when the first character of the dev name > provided is NULL. Solution is to add a NULL check before calling > cdev_device_add() in vduse_create_dev(). > > kobject: (72042169): attempted to be registered

Re: [PATCH net-next 2/5] virtio_net: Add page_pool support to improve performance

2023-05-30 Thread Xuan Zhuo
On Mon, 29 May 2023 15:28:17 +0800, Liang Chen wrote: > On Sun, May 28, 2023 at 2:40 PM Michael S. Tsirkin wrote: > > > > On Sat, May 27, 2023 at 08:35:01PM +0800, Liang Chen wrote: > > > On Fri, May 26, 2023 at 2:51 PM Jason Wang wrote: > > > > > > > > On Fri, May 26, 2023 at 1:46 PM Liang

Re: [syzbot] [kvm?] [net?] [virt?] general protection fault in vhost_work_queue

2023-05-30 Thread michael . christie
On 5/30/23 11:17 AM, Stefano Garzarella wrote: > On Tue, May 30, 2023 at 11:09:09AM -0500, Mike Christie wrote: >> On 5/30/23 11:00 AM, Stefano Garzarella wrote: >>> I think it is partially related to commit 6e890c5d5021 ("vhost: use >>> vhost_tasks for worker threads") and commit 1a5f8090c6de

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

2023-05-30 Thread Oleg Nesterov
On 05/30, Christian Brauner wrote: > > On Mon, May 29, 2023 at 01:19:39PM +0200, Oleg Nesterov wrote: > > > > If we want CLONE_THREAD, I think vhost_worker() should exit after > > get_signal() > > returns SIGKILL. Perhaps it should "disable" vhost_work_queue() somehow and > > Yes, and that's what

Re: [PATCH v1] virtio-pci: Improve code style for including header files

2023-05-30 Thread Feng Liu via Virtualization
On 2023-05-30 a.m.11:18, Michael S. Tsirkin wrote: External email: Use caution opening links or attachments On Tue, May 30, 2023 at 10:07:23AM -0400, Feng Liu wrote: On 2023-05-30 a.m.7:27, Michael S. Tsirkin wrote: External email: Use caution opening links or attachments On Mon, May

Re: [RFC PATCHES 00/17] IOMMUFD: Deliver IO page faults to user space

2023-05-30 Thread Jason Gunthorpe
On Tue, May 30, 2023 at 01:37:07PM +0800, Lu Baolu wrote: > Hi folks, > > This series implements the functionality of delivering IO page faults to > user space through the IOMMUFD framework. The use case is nested > translation, where modern IOMMU hardware supports two-stage translation > tables.

Re: [PATCH] virtio_ring: validate used buffer length

2023-05-30 Thread Jason Wang
On Mon, May 29, 2023 at 6:03 PM Michael S. Tsirkin wrote: > > On Mon, May 29, 2023 at 09:18:10AM +0800, Jason Wang wrote: > > On Sun, May 28, 2023 at 3:57 PM Michael S. Tsirkin wrote: > > > > > > On Fri, May 26, 2023 at 02:30:41PM +0800, Jason Wang wrote: > > > > This patch validate > > > > > >

Re: [PATCH V3 net-next 1/2] virtio-net: convert rx mode setting to use workqueue

2023-05-30 Thread Jason Wang
On Mon, May 29, 2023 at 9:21 AM Jason Wang wrote: > > On Sun, May 28, 2023 at 7:39 PM Michael S. Tsirkin wrote: > > > > On Fri, May 26, 2023 at 09:31:34AM +0800, Jason Wang wrote: > > > On Thu, May 25, 2023 at 3:41 PM Michael S. Tsirkin > > > wrote: > > > > > > > > On Thu, May 25, 2023 at

Re: [PATCH v7 virtio 09/11] pds_vdpa: add support for vdpa and vdpamgmt interfaces

2023-05-30 Thread Jason Wang
On Sat, May 20, 2023 at 5:57 AM Shannon Nelson wrote: > > This is the vDPA device support, where we advertise that we can > support the virtio queues and deal with the configuration work > through the pds_core's adminq. > > Signed-off-by: Shannon Nelson > --- > > Note: this had previously been

Re: [PATCH v1 5/9] KVM: x86: Add new hypercall to lock control registers

2023-05-30 Thread Kees Cook
On Mon, May 29, 2023 at 06:48:03PM +0200, Mickaël Salaün wrote: > > On 08/05/2023 23:11, Wei Liu wrote: > > On Fri, May 05, 2023 at 05:20:42PM +0200, Mickaël Salaün wrote: > > > This enables guests to lock their CR0 and CR4 registers with a subset of > > > X86_CR0_WP, X86_CR4_SMEP, X86_CR4_SMAP,