Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 847094 - app-emulation/virtualbox-modules-6.1.34 fails for kernel 5.18.0 implicit declaration of function 'netif_rx_ni
Summary: app-emulation/virtualbox-modules-6.1.34 fails for kernel 5.18.0 implicit dec...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Viorel Munteanu
URL:
Whiteboard:
Keywords: PATCH, PullRequest
: 836758 849410 860342 865001 (view as bug list)
Depends on: 860897
Blocks:
  Show dependency tree
 
Reported: 2022-05-23 12:28 UTC by Helmut Jarausch
Modified: 2022-08-13 16:49 UTC (History)
31 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
virtualbox-modules-6.1.34-linux-5.18.0.patch (virtualbox-modules-6.1.34-linux-5.18.0.patch,732 bytes, patch)
2022-06-05 06:54 UTC, Peter Levine
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Helmut Jarausch 2022-05-23 12:28:41 UTC
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'?
Comment 2 Argh!... Rats!... 2022-05-23 23:29:42 UTC
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...
Comment 3 Markus Giese 2022-05-25 15:55:41 UTC
same here virtualbox-modules-6.1.34 with 5.18.0
Comment 4 David Korth 2022-05-25 21:34:15 UTC
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
Comment 5 peter@prh.myzen.co.uk 2022-05-31 07:37:12 UTC
Also fails with kernel 5.18.1-gentoo-r1.
Comment 6 Silvio 2022-06-04 04:20:58 UTC
(In reply to peter@prh.myzen.co.uk from comment #5)
> Also fails with kernel 5.18.1-gentoo-r1.

I confirm. Same error.
Comment 7 Peter Levine 2022-06-05 06:54:21 UTC
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.
Comment 8 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-06-06 05:43:17 UTC
*** Bug 849410 has been marked as a duplicate of this bug. ***
Comment 9 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-06-06 05:44:48 UTC
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.
Comment 10 cyrillic 2022-06-15 22:51:26 UTC
This is sort of old news.
See bug 836758
Comment 11 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-06-15 23:05:17 UTC
(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.
Comment 12 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-06-15 23:05:36 UTC
*** Bug 836758 has been marked as a duplicate of this bug. ***
Comment 13 Peter Levine 2022-06-16 04:08:39 UTC
(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.
Comment 14 ignamartinoli 2022-06-16 04:16:52 UTC
If there is a patch already, is it possible to apply it using Portage?
Comment 15 Joonas Niilola gentoo-dev 2022-06-16 05:44:01 UTC
(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.
Comment 16 Olivier 2022-06-17 15:39:51 UTC
(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!!
Comment 17 peter@prh.myzen.co.uk 2022-07-01 12:45:47 UTC
(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]
Comment 18 Alex Barker 2022-07-07 15:01:09 UTC
(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.
Comment 19 ignamartinoli 2022-07-07 22:12:58 UTC
Any news from this https://github.com/gentoo/gentoo/pull/26126?

It's been a week and I haven't heard anything from it
Comment 20 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-07-07 22:30:20 UTC
(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.
Comment 21 ignamartinoli 2022-07-07 22:35:18 UTC
Thanks for working on this Sam, I hope it goes smooth
Comment 22 peter@prh.myzen.co.uk 2022-07-08 12:24:39 UTC
> 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.
Comment 23 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-07-18 13:06:02 UTC
*** Bug 858794 has been marked as a duplicate of this bug. ***
Comment 24 Viorel Munteanu gentoo-dev 2022-07-20 18:55:51 UTC
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.
Comment 25 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-07-23 19:34:19 UTC
*** Bug 860342 has been marked as a duplicate of this bug. ***
Comment 26 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-07-23 19:34:38 UTC
(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.
Comment 27 ignamartinoli 2022-07-23 20:33:19 UTC
(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
Comment 28 Larry the Git Cow gentoo-dev 2022-07-27 21:05:42 UTC
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(+)
Comment 29 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-08-12 15:58:22 UTC
*** Bug 865001 has been marked as a duplicate of this bug. ***
Comment 30 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-08-13 16:49:19 UTC
*** Bug 865001 has been marked as a duplicate of this bug. ***