Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 858794

Summary: app-emulation/virtualbox-modules-6.1.34 fails to compile against 5.18.12 kernel (error: __write_overflow_field declared with attribute warning: detected write beyond size of field (1st parameter); maybe use struct_group)
Product: Gentoo Linux Reporter: Alexey Mikhailov <alexey.mikhailov>
Component: Current packagesAssignee: Viorel Munteanu <ceamac>
Status: RESOLVED FIXED    
Severity: normal CC: proxy-maint
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=847094
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: emerge @module-rebuild + emerge --info

Description Alexey Mikhailov 2022-07-18 13:04:52 UTC
Created attachment 792152 [details]
emerge @module-rebuild + emerge --info

virtualbox-modules-6.1.34 fails to build anymore. Tested with gcc 12.1.1 and 11.3.0, 5.18.9 and 5.8.12 kernels.
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-07-18 13:06:02 UTC

*** This bug has been marked as a duplicate of bug 847094 ***
Comment 2 Alexey Mikhailov 2022-07-18 16:48:30 UTC
I'd seen #847094, but that's another issue.
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-07-18 23:38:14 UTC
Can you try without -Werror?
Comment 4 Alexey Mikhailov 2022-07-19 08:49:04 UTC
I'm not sure where is -Werror coming from. I'd finished up modifying Makefile by adding '-Wno-error=attribute-warning' to VBOXMOD_CFLAGS in Makefile - looks like it fixed this issue. Going to investigate more.
Comment 5 Alexey Mikhailov 2022-07-19 09:22:37 UTC
I'd met error from #847094 afterwards. Patched VBoxNetFlt-linux.c by hands:

+#if RTLNX_VER_MIN(5,18,0)
+                local_bh_disable();
+                err = netif_rx(pBuf);
+                local_bh_enable();
+#else
                 err = netif_rx_ni(pBuf);
+#endif

Compilation finished successfully.