[PATCH 0/3] vdpa: Fix SIGSEGV on failed vdpa devices

Eugenio Pérez posted 3 patches 2 years, 5 months ago
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20211119102033.36149-1-eperezma@redhat.com
There is a newer version of this series
hw/net/virtio-net.c | 13 +++++++------
net/vhost-vdpa.c    | 16 ++++++++++++++++
2 files changed, 23 insertions(+), 6 deletions(-)
[PATCH 0/3] vdpa: Fix SIGSEGV on failed vdpa devices
Posted by Eugenio Pérez 2 years, 5 months ago
Qemu falls back on userland handlers even if vhost-user and vhost-vdpa
cases. These assumes a tap device can handle the packets.

If a vdpa device fail to start, it can trigger a sigsegv because of
that. Add dummy receivers that return no progress so it can keep
running.

Tested with a modified version of vp_vdpa to fail negotiation.

This is another bersion of the patch proposed in [1], but the subject
didn't match the patch anymore.

[1] https://lists.nongnu.org/archive/html/qemu-devel/2021-11/msg03719.html

Eugenio Pérez (3):
  virtio-net: Fix indentation
  vdpa: Add dummy receive callbacks
  virtio-net: Fix log message

 hw/net/virtio-net.c | 13 +++++++------
 net/vhost-vdpa.c    | 16 ++++++++++++++++
 2 files changed, 23 insertions(+), 6 deletions(-)

-- 
2.27.0



Re: [PATCH 0/3] vdpa: Fix SIGSEGV on failed vdpa devices
Posted by Jason Wang 2 years, 5 months ago
On Fri, Nov 19, 2021 at 6:20 PM Eugenio Pérez <eperezma@redhat.com> wrote:
>
> Qemu falls back on userland handlers even if vhost-user and vhost-vdpa
> cases. These assumes a tap device can handle the packets.
>
> If a vdpa device fail to start, it can trigger a sigsegv because of
> that. Add dummy receivers that return no progress so it can keep
> running.
>
> Tested with a modified version of vp_vdpa to fail negotiation.
>
> This is another bersion of the patch proposed in [1], but the subject
> didn't match the patch anymore.
>
> [1] https://lists.nongnu.org/archive/html/qemu-devel/2021-11/msg03719.html
>

As discussed, we need to consider fixing the gRARP transmission issue
on top, any idea on that?

Thanks

> Eugenio Pérez (3):
>   virtio-net: Fix indentation
>   vdpa: Add dummy receive callbacks
>   virtio-net: Fix log message
>
>  hw/net/virtio-net.c | 13 +++++++------
>  net/vhost-vdpa.c    | 16 ++++++++++++++++
>  2 files changed, 23 insertions(+), 6 deletions(-)
>
> --
> 2.27.0
>
>