четверг

[Bug 2067862] Re: remove virtio legacy device make kernel Oops

Hi Dong,

I have been reading:

https://lore.kernel.org/kvm/CACGkMEs1t-ipP7TasHkKNKd=peVEES6Xdw1zSsJkb-
bc9Etx9Q@mail.gmail.com/T/#m167335bf7ab09b12fec3bdc5d46a30bc2e26cac7

and I tried to reproduce the problem with 23.10's userspace, but I can't
see the same crash.

By virtio legacy devices, you mean 0.97 virtio devices from ~2014 right?
Would I need a 14.04 hypervisor to see this issue? I can try deploy one.

In any case, I have started building the below commit into a test kernel
for you to try.

commit c8fae27d141a32a1624d0d0d5419d94252824498
From: Li Zhang <zhanglikernel@gmail.com>
Date: Sat, 16 Mar 2024 13:25:54 +0800
Subject: virtio-pci: Check if is_avq is NULL
Link: https://github.com/torvalds/linux/commit/c8fae27d141a32a1624d0d0d5419d94252824498

This kernel is going to take about 3 hours to compile, so wait 3 hours after this message before installing. You can also check status here:
https://launchpad.net/~mruffell/+archive/ubuntu/lp2067862-test

Please note this package is NOT SUPPORTED by Canonical, and is for TESTING
PURPOSES ONLY. ONLY Install in a dedicated test environment.

Instructions to Install (On a noble system):
1) sudo add-apt-repository ppa:mruffell/lp2067862-test
2) sudo apt update
3) sudo apt install linux-image-unsigned-6.8.0-31-generic linux-modules-6.8.0-31-generic linux-modules-extra-6.8.0-31-generic linux-headers-6.8.0-31-generic
4) sudo reboot
5) uname -rv
Look for "6.8.0-31.31+TEST2067862v20240614b1".

You might be asked to abort removing the currently running kernel. Say
no.

Does the test kernel fix your issue?

Can you help me define the testcase so I can write a SRU template? How
do you reproduce the problem?

Thanks,
Matthew

--
You received this bug notification because you are subscribed to linux
in Ubuntu.
Matching subscriptions: Bgg, Bmail, Nb
https://bugs.launchpad.net/bugs/2067862

Title:
remove virtio legacy device make kernel Oops

Status in linux package in Ubuntu:
Fix Released
Status in linux source package in Noble:
New

Bug description:
In the Ubuntu 24's 6.8.0-31-generic kernel version, the capability
https://github.com/torvalds/linux/commit/fd27ef6b44bec26915c5b2b22c13856d9f0ba17a
(virtio-pci: Introduce admin virtqueue) was added. However, an issue
was overlooked by the upstream community, which is that if the virtio
device is not a modern virtio device, but a legacy virtio device, the
is_avq function pointer is not assigned, resulting in a NULL pointer
for the is_avq function pointer in the virtio_pci_device structure of
the legacy virtio device. When unloading the virtio device, if the
code calls if (vp_dev->is_avq(vdev, vq->index)), the RIP register of
the CPU points to a NULL pointer address.

I have noticed that the kernel community has already included a
related solution, and I hope that the Ubuntu kernel can backport to
support the remove operation for legacy virtio devices:
https://github.com/torvalds/linux/commit/c8fae27d141a32a1624d0d0d5419d94252824498
(virtio-pci: Check if is_avq is NULL).

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2067862/+subscriptions

Комментариев нет:

Отправить комментарий