virtualbox-modules-6.1.34 doesn't build with the new kernel 5.18.0 I get VBoxNetFlt-linux.c:2314:23: error: implicit declaration of function 'netif_rx_ni'; did you mean 'netif_rx'?
i've found this patch https://raw.githubusercontent.com/rpmfusion/VirtualBox-kmod/master/0001-Linux-Host-Drivers-VBoxNetFlt-Initial-support-for-ke.patch
Have the same Problem ``` /var/tmp/portage/app-emulation/virtualbox-modules-6.1.34/work/vboxnetflt/linux/VBoxNetFlt-linux.c: In function ‘vboxNetFltPortOsXmit’: /var/tmp/portage/app-emulation/virtualbox-modules-6.1.34/work/vboxnetflt/linux/VBoxNetFlt-linux.c:2314:23: error: implicit declaration of function ‘netif_rx_ni’; did you mean ‘netif_rx’? [-Werror=implicit-function-declaration] 2314 | err = netif_rx_ni(pBuf); | ^~~~~~~~~~~ | netif_rx cc1: some warnings being treated as errors make[3]: *** [scripts/Makefile.build:288: /var/tmp/portage/app-emulation/virtualbox-modules-6.1.34/work/vboxnetflt/linux/VBoxNetFlt-linux.o] Error 1 make[2]: *** [Makefile:1834: /var/tmp/portage/app-emulation/virtualbox-modules-6.1.34/work/vboxnetflt] Error 2 make[2]: Leaving directory '/usr/src/linux-5.18.0-gentoo' make[1]: *** [/var/tmp/portage/app-emulation/virtualbox-modules-6.1.34/work/vboxnetflt/Makefile-footer.gmk:117: vboxnetflt] Error 2 make[1]: Leaving directory '/var/tmp/portage/app-emulation/virtualbox-modules-6.1.34/work/vboxnetflt' make: *** [Makefile:65: vboxnetflt] Error 1 * ERROR: app-emulation/virtualbox-modules-6.1.34::gentoo failed (compile phase): ``` found this: - https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=2655926aea9beea62c9ba80c032485456fd848f0 Not sure this hints to our problem...
same here virtualbox-modules-6.1.34 with 5.18.0
Although the patch fixes module compilation, there's a lower-level problem caused by FPU state changes in 5.18, which results in guest processes randomly crashing. A patch for this is available upstream: https://www.virtualbox.org/ticket/20914
Also fails with kernel 5.18.1-gentoo-r1.
(In reply to peter@prh.myzen.co.uk from comment #5) > Also fails with kernel 5.18.1-gentoo-r1. I confirm. Same error.
Created attachment 782840 [details, diff] virtualbox-modules-6.1.34-linux-5.18.0.patch netif_rx_ni is removed in 5.18.0. Test this patch.
*** Bug 849410 has been marked as a duplicate of this bug. ***
For users, I'd really recommend using an LTS kernel if relying on out of tree kernel modules. This happens pretty much with every kernel release. And using patches found online may not be reliable or sufficient. As for the maintainer of the ebuild, they should consider adding a check like the nvidia-drivers ebuild has.
This is sort of old news. See bug 836758
(In reply to cyrillic from comment #10) > This is sort of old news. > See bug 836758 Duplicates happen, but there's somewhat more valuable information in this bug (however unfortunate that may be) because of the discussion about bad patches too. So I'll reverse-dupe.
*** Bug 836758 has been marked as a duplicate of this bug. ***
(In reply to cyrillic from comment #10) > This is sort of old news. > See bug 836758 I see. I was carrying this around in /etc/portage/patches for a number of months, so I thought I'd post. I guarded the affected code with a macro check for the kernel version but I'm not sure if that's even necessary. Either way, the fix is pretty straightforward.
If there is a patch already, is it possible to apply it using Portage?
(In reply to ignamartinoli from comment #14) > If there is a patch already, is it possible to apply it using Portage? Yes, you can utilize /etc/portage/patches for that. But please see #c4 why it may not always be smart.
(In reply to Peter Levine from comment #7) > Created attachment 782840 [details, diff] [details, diff] > virtualbox-modules-6.1.34-linux-5.18.0.patch > > netif_rx_ni is removed in 5.18.0. > > Test this patch. I am using VirtualBox 6.1.34 on Debian Testing (Bookworm) and the amd64 package for Debian Stable (Bullseye) has been updated on 20 May 2022. (see https ://download.virtualbox.org/virtualbox/debian/dists/bullseye/contrib/) Since then the regression you are talking about here appeared for me as well: it became impossible to run any virtual machine. I (manually) applied the changes identified in your patch on file /usr/share/virtualbox/src/vboxhost/vboxnetflt/linux/VBoxNetFlt-linux.c and then run /sbin/vboxconfig as root. After the due configuration process, everything worked fine as before! Thank you so much for spotting this!!
(In reply to Olivier from comment #16) > I applied the changes identified in your patch on file > /usr/share/virtualbox/src/vboxhost/vboxnetflt/linux/VBoxNetFlt-linux.c > and then run /sbin/vboxconfig as root. > > After the due configuration process, everything worked fine as before! Thank > you so much for spotting this!! I tried it here on Gentoo ~amd64 and it made no difference: the same error was thrown while compiling app-emulation/virtualbox-modules-6.1.34 against sys-kernel/gentoo-sources-5.18.n, where n=[3-8]
(In reply to peter@prh.myzen.co.uk from comment #17) > I tried it here on Gentoo ~amd64 and it made no difference: the same error > was thrown while compiling app-emulation/virtualbox-modules-6.1.34 against > sys-kernel/gentoo-sources-5.18.n, where n=[3-8] The patch worked for me, I've been using it with 5.18.[7-8] for about a week without issue. Are you sure the patch was applied? I needed to modify the path "vboxnetflt/linux/VBoxNetFlt-linux.c" to "a/vboxnetflt/linux/VBoxNetFlt-linux.c" after dropping it in /etc/portage/patches/app-emulation/virtualbox-modules/virtualbox-modules-6.1.34-remove-netif_rx_ni.patch to get it to work.
Any news from this https://github.com/gentoo/gentoo/pull/26126? It's been a week and I haven't heard anything from it
(In reply to ignamartinoli from comment #19) > Any news from this https://github.com/gentoo/gentoo/pull/26126? > > It's been a week and I haven't heard anything from it https://github.com/gentoo/gentoo/pull/26126#issuecomment-1169369285 is why I'm concerned. I don't want to introduce runtime issues.
Thanks for working on this Sam, I hope it goes smooth
> Are you sure the patch was applied? You're right; it wasn't. It's ok now though, since I sorted out where to put the patch. :( Thanks for the hint.
*** Bug 858794 has been marked as a duplicate of this bug. ***
From what I read VirtualBox is unstable on kernel 5.18 (crashes randomly). Upstream fixed it in VirtualBox 6.1.36, but that version is not yet released. So for the moment I'd rather wait for the new release.
*** Bug 860342 has been marked as a duplicate of this bug. ***
(In reply to Viorel from comment #24) > From what I read VirtualBox is unstable on kernel 5.18 (crashes randomly). > Upstream fixed it in VirtualBox 6.1.36, but that version is not yet > released. So for the moment I'd rather wait for the new release. It's out now, fwiw.
(In reply to Sam James from comment #26) > (In reply to Viorel from comment #24) > > From what I read VirtualBox is unstable on kernel 5.18 (crashes randomly). > > Upstream fixed it in VirtualBox 6.1.36, but that version is not yet > > released. So for the moment I'd rather wait for the new release. > > It's out now, fwiw. The latest version is 6.1.34-r6, we should ask for a version bump https://packages.gentoo.org/packages/app-emulation/virtualbox
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c53cd055a158fc13455d2b51a13af69efdf9f200 commit c53cd055a158fc13455d2b51a13af69efdf9f200 Author: Viorel Munteanu <ceamac.paragon@gmail.com> AuthorDate: 2022-07-26 19:30:32 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2022-07-27 21:05:30 +0000 app-emulation/virtualbox-modules: add 6.1.36 Closes: https://bugs.gentoo.org/847094 Signed-off-by: Viorel Munteanu <ceamac.paragon@gmail.com> Signed-off-by: Sam James <sam@gentoo.org> app-emulation/virtualbox-modules/Manifest | 1 + .../virtualbox-modules-6.1.36.ebuild | 65 ++++++++++++++++++++++ 2 files changed, 66 insertions(+)
*** Bug 865001 has been marked as a duplicate of this bug. ***