Summary: | >=app-emulation/virtualbox-modules-4.1.4[pax_kernel] - work/vboxdrv/SUPDrvIDC.h:163:22: error: expected ':', ',', ';', '}' or '__attribute__' before 'Out' | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Matthias Hanft <gentoo-bugzilla> |
Component: | Current packages | Assignee: | The Gentoo Linux Hardened Team <hardened> |
Status: | RESOLVED OBSOLETE | ||
Severity: | normal | CC: | blueness, bugs+gentoo, da_risk, hardened-kernel+disabled, howard_b_golden, jeff, lonewolf4, moonlapse81, pageexec, patrick, polynomial-c, proxy-maint, sven.czar, swapon, tim.sammut, turner25 |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | /usr/src/linux/.config |
Description
Matthias Hanft
2011-12-10 09:49:57 UTC
Can't reproduce that. What does your kernel .config look like? Created attachment 295417 [details]
/usr/src/linux/.config
I have 3 Gentoo systems. With kernel-2.6.38-r6, virtualbox-modules-4.1.4 compile without problems. The other 2 systems have kernel-3.0.6, there the error occurs. In the attachment, you'll find the .config of one of them. I just switched some net stuff to YES (Advanced Router, Multiple Routing Tables, iptables/netfilter), the rest is pretty default... Same issue here. Kernel 3.1.6-gentoo Same virtualbox-modules version Me too. I'm unable to successfuly compile any virtualbox-modules-4.1.* against linux-kernel >=3.0 with additional patches or clean vanilla gentoo-source. There is no problem with 2.6.39* at all. Same error message: "SUPDrvIDC.h:163:22: error: expected ‘:’, ‘,’, ‘;’, ‘}’ or ‘__attribute__’ before ‘Out’". It is strange that some people apparently have no problem with linux-3.* and virtualbox-modules. Even worse: Since virtualbox-modules-4.0.12 was removed from portage, you can't upgrade the kernel any more because module-rebuild complains "emerge: there are no ebuilds to satisfy "=app-emulation/virtualbox-modules-4.0.12"." Any workaround? Just copy /lib/modules/3.0.6-gentoo/misc/vboxdrv.ko etc. to /lib/modules/3.1.6-gentoo/misc? The failing code in SUPDrvIDC.h:163:22 is added by the virtualbox-modules-4.1.4-pax-const.patch patch. This patch is only applied if use pax_kernel && kernel_is -ge 3 0 0. Though I don't understand why, my GCC 4.5.3 doesn't understand the __no_const attribute. When I comment out the test and epatch, virtualbox-modules-4.1.8 builds successfully. (In reply to comment #8) > The failing code in SUPDrvIDC.h:163:22 is added by the > virtualbox-modules-4.1.4-pax-const.patch patch. This patch is only applied > if use pax_kernel && kernel_is -ge 3 0 0. After reading Howard's comment, I tried to emerge without pax_kernel use flag against my 3.2.9 kernel (straight from git's tag for v3.2.9). With these options, virtualbox-modules version... 4.1.8 worked perfectly on first shot. 4.1.4 failed with the infamous "vboxpci.ko" issue (known bug) 4.1.6 worked perfectly on first shot. Earlier, all 3 versions of vbox-mods had failed with all the kernel versions I tried that were >=3.0 My kernel config was an i386_defconfig before I modified it to support a few XEN-related options, some drivers (network, wireless, graphics, usb) and filesystems (only ext2, and udf,ntfs,samba for compatibility). This is my current gcc profile: [1] i686-pc-linux-gnu-4.5.3 * (In reply to comment #8) > When I comment out the test and epatch, virtualbox-modules-4.1.8 builds > successfully. This same workaround is successful with virtualbox-modules-4.1.10. Perhaps the 4.1.4 patch is not required with later versions? (In reply to comment #10) > (In reply to comment #8) > > When I comment out the test and epatch, virtualbox-modules-4.1.8 builds > > successfully. > > This same workaround is successful with virtualbox-modules-4.1.10. Perhaps > the 4.1.4 patch is not required with later versions? And it works for virtualbox-modules-4.1.12 as well. (In reply to comment #11) > > And it works for virtualbox-modules-4.1.12 as well. Correct (just USE="-pax_kernel" - no further patch required). Does anyone know what "using" the pax_kernel flag/patch exactly does, and why it was introduced at all? (BTW, do I have a "pax kernel" where USE="pax_kernel" might be necessary? I'm just using the "hardened/linux/x86" profile, but everything else is plain vanilla. Seems that virtualbox-modules run flawlessly with USE="-pax_kernel", but I'm still a bit uneasy about it...) -Matt (In reply to comment #11) > And it works for virtualbox-modules-4.1.12 as well. And it works for virtualbox-modules-4.1.14 as well. (What does it take to change the status to "Confirmed"?) Can someone from the hardened teams please have a look at this? __no_const is a define to an attribute introduced by a gcc plugin in PaX but it is meaningless (undefined) otherwise. USE=pax_kernel should control whether you're building your modules against a PaX or grsec patched kernel or not (you can use a non-plugin capable gcc, the PaX makefile will detect that and will define away these new attributes). so in order to see what exactly goes wrong, i'd like to know for each failure case: 1. exact kernel tree you're building against 2. gcc version used for building your kernel/modules 3. whether you enable USE=pax_kernel or not a quick guide to a proper setup: 1. if your kernel includes PaX/grsec (e.g., hardened) then 1.1 you *must* set USE=pax_kernel *if* your gcc is plugin capable (gcc 4.5+) 1.2 you *may* set USE=pax_kernel but it won't do anything 2. if you kernel does *not* include PaX/grsec then you must *not* set USE=pax_kernel. *** Bug 446966 has been marked as a duplicate of this bug. *** *** Bug 472356 has been marked as a duplicate of this bug. *** same issue in current version : app-emulation/virtualbox-modules-4.3.28: : /var/tmp/portage/app-emulation/virtualbox-modules-4.3.28/work/vboxdrv/linux/../SUPDrvIDC.h:163:22: error: expected ‘:’, ‘,’, ‘;’, ‘}’ or ‘__attribute__’ before ‘Out’ (In reply to Toralf Förster from comment #18) > same issue in current version : > > app-emulation/virtualbox-modules-4.3.28: : > /var/tmp/portage/app-emulation/virtualbox-modules-4.3.28/work/vboxdrv/linux/. > ./SUPDrvIDC.h:163:22: error: expected ‘:’, ‘,’, ‘;’, ‘}’ or ‘__attribute__’ > before ‘Out’ see comment #15 for the information i need. FWIW, virtualbox-modules-4.3.28 emerges fine here with linux-4.0.4 patched with PaX only and USE=pax_kernel. Same issue on latest virtualbox-modules-5.0.0. Note that with USE=pax_kernel, I am able to successfully build if I don't use an hardened gcc. ``` nowhere ~ # gcc-config -l [1] i686-pc-mingw32-4.9.2 [2] i686-pc-mingw32-4.9.2-hardenednopie [3] i686-pc-mingw32-4.9.2-vanilla [4] i686-pc-mingw32-4.9.3 * [5] i686-pc-mingw32-4.9.3-hardenednopie [6] i686-pc-mingw32-4.9.3-vanilla [7] x86_64-pc-linux-gnu-4.9.3 [8] x86_64-pc-linux-gnu-4.9.3-hardenednopie * [9] x86_64-pc-linux-gnu-4.9.3-hardenednopiessp [10] x86_64-pc-linux-gnu-4.9.3-hardenednossp [11] x86_64-pc-linux-gnu-4.9.3-vanilla ``` I can build successfully with x86_64-pc-linux-gnu-4.9.3-hardenednopie but not with x86_64-pc-linux-gnu-4.9.3. Hope this will help Also confirms everything with GCC 5.1. So basically it only works if /usr/src/linux is really a PaX kernel if USE="pax_kernel" is set. Thanks for information from PaX Team. Me too. Successful workaround: USE="-pax_kernel" emerge -av virtualbox Further details on my case: - running kernel: 4.3.3 (linux-4.3.3-hardened-r4 = Hardened Gentoo sources) - /usr/src/linux: 4.4.1 (linux-4.4.1-gentoo = Gentoo sources) ... running kernel version is mostly because ZFS (zfs-0.6.5.4). Also... [8] x86_64-pc-linux-gnu-4.9.3 * gcc (Gentoo Hardened 4.9.3 p1.5, pie-0.6.4) 4.9.3 app-emulation/virtualbox-modules-4.3.38 |