Page 1 of 1

kernel 4.3-rc1 heads up

Posted: 14. Sep 2015, 11:29
by sboyce
I know -rc kernels not supported.

VirtualBox-5.0-5.0.4_102546_openSUSE132-1.x86_64.rpm module build.

/tmp/vbox.0/linux/SUPDrv-linux.c: In function ‘VBoxDrvLinuxUnload’:
/tmp/vbox.0/linux/SUPDrv-linux.c:487:8: error: void value not ignored as it ought to be
rc = misc_deregister(&gMiscDeviceUsr);
^
/tmp/vbox.0/linux/SUPDrv-linux.c:492:8: error: void value not ignored as it ought to be
rc = misc_deregister(&gMiscDeviceSys);
^
scripts/Makefile.build:258: recipe for target '/tmp/vbox.0/linux/SUPDrv-linux.o' failed
make[2]: *** [/tmp/vbox.0/linux/SUPDrv-linux.o] Error 1
Makefile:1378: recipe for target '_module_/tmp/vbox.0' failed
make[1]: *** [_module_/tmp/vbox.0] Error 2
Makefile:298: recipe for target 'vboxdrv' failed
make: *** [vboxdrv] Error 2

Re: kernel 4.3-rc1 heads up

Posted: 16. Sep 2015, 05:22
by wifi
Thats look fairly similar to the errors I have tracked down trying to install virtualbox but I have one question and I am by no means even remotely knowledgable about kernels, what is a -rc kernel? Linux parrot 4.1.7-parrot-686-pae << my uname -r output, does mine fall under that -rc category???....google has failed me and now I must ask... Feel free to giggle :P And thanx for your answer in advance...

Re: kernel 4.3-rc1 heads up

Posted: 16. Sep 2015, 19:31
by noteirak
AFAIK rc stands for Release candidate, and is not specific to kernels. Any software would have that version label.

Re: kernel 4.3-rc1 heads up

Posted: 16. Sep 2015, 21:12
by wifi
Thank you for the answer :)...

Re: kernel 4.3-rc1 heads up

Posted: 16. Sep 2015, 21:17
by loukingjr
"Linux parrot 4.1.7-parrot-686-pae" doesn't say "-rc"

Re: kernel 4.3-rc1 heads up

Posted: 18. Sep 2015, 13:06
by sboyce
wifi wrote:Thats look fairly similar to the errors I have tracked down trying to install virtualbox but I have one question and I am by no means even remotely knowledgable about kernels, what is a -rc kernel? Linux parrot 4.1.7-parrot-686-pae << my uname -r output, does mine fall under that -rc category???....google has failed me and now I must ask... Feel free to giggle :P And thanx for your answer in advance...
-rc stands for release candidate. The Linux kernel development releases a number before the final release, e.g -rc1, -rc2 ----> -rc7 then 4.3 final.

In your case the distro releases 4.1 kernels as 4.1.0 with progressive upgrades to 4.1.7.

Re: kernel 4.3-rc1 heads up

Posted: 21. Sep 2015, 17:43
by Valentin
OBJECT : Patch to Use VirtualBox on Linux host with Linux kernel version from 4.3-rc1 upwards, yet *potentialy dangerous*

Hi, dudes,

A few minutes ago (when I began to write this explanative text), I wrote a patch against VirtualBox Linux kernel driver to make it run on Linux 4.3-rcX and, hopefully (future will say), yet-to-land Linux 4.3 and I managed to boot under the updated Linux 4.3-rc2 kernel and use a VBox-based virtual machine successfully.

Since I am not used to compile VBox from sources, I lazingly download a binary package for my Debian-based distro (Ubuntu XYZ wtf :-) .

However, the VBox Linux kernel module(s) sustaining VBox virtualization are shipped in form of source code in that aforementioned binary packge, for reasons obvious to some of the k_readers ^_^.

Consequently, the patch I have to show you is not directly targetted towards VBox source repo/dir/developers ... but targetted towards we us all, the casual users (You will not need to build whole VBox from source to get benefit from my patch).

Since I downloaded a Debian-based-targetted VBox package ( *.deb ) , I got the following filesystem layout, here reproduced *very* partially :-))) :

/usr/share/virtualbox/src/vboxhost/vboxdrv/linux/SUPDrv-linux.c
/usr/share/virtualbox/src/vboxhost/vboxnetadp/linux/VBoxNetAdp-linux.c


The patch to apply to SUPDrv-linux.c looks like this :

--- a/SUPDrv-linux.c 2015-08-17 16:50:05.000000000 +0200
+++ b/SUPDrv-linux.c 2015-09-21 16:20:04.000267179 +0200
@@ -485,6 +485,7 @@ static void __exit VBoxDrvLinuxUnload(vo
* opened, at least we'll blindly assume that here.
*/
#ifdef CONFIG_VBOXDRV_AS_MISC
+# if LINUX_VERSION_CODE < KERNEL_VERSION(4,3,0)
rc = misc_deregister(&gMiscDeviceUsr);
if (rc < 0)
{
@@ -495,6 +496,10 @@ static void __exit VBoxDrvLinuxUnload(vo
{
Log(("misc_deregister failed with rc=%#x on vboxdrv\n", rc));
}
+# else
+ misc_deregister(&gMiscDeviceUsr);
+ misc_deregister(&gMiscDeviceSys);
+# endif
#else /* !CONFIG_VBOXDRV_AS_MISC */
# ifdef CONFIG_DEVFS_FS
/*



The patch to apply to VBoxNetAdp-linux.c looks like this :

--- a/VBoxNetAdp-linux.c 2015-08-17 16:50:05.000000000 +0200
+++ b/VBoxNetAdp-linux.c 2015-09-21 16:28:44.180959610 +0200
@@ -436,7 +436,11 @@ static void __exit VBoxNetAdpLinuxUnload

vboxNetAdpShutdown();
/* Remove control device */
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,3,0)
rc = misc_deregister(&g_CtlDev);
+#else
+ misc_deregister(&g_CtlDev);
+#endif
if (rc < 0)
{
printk(KERN_ERR "misc_deregister failed with rc=%x\n", rc);


Hope this helps,
Valentin QUEQUET (Grasse, FRANCE)

Re: kernel 4.3-rc1 heads up

Posted: 22. Sep 2015, 01:09
by sboyce
Thanks,
The patch worked.

Re: kernel 4.3-rc1 heads up

Posted: 29. Sep 2015, 05:57
by ckujau
Thanks, @Valentin - the patch worked indeed! I wonder if we need to open a proper bug report to get this fix into the next release?

Re: kernel 4.3-rc1 heads up

Posted: 29. Sep 2015, 11:08
by incident41
ckujau wrote:Thanks, @Valentin - the patch worked indeed! I wonder if we need to open a proper bug report to get this fix into the next release?
Not needed - I reported this on vbox-dev on Sep 16 with a similar patch (https://www.virtualbox.org/pipermail/vb ... 13476.html) and Frank replied a few days later that a similar one had been applied already.

Re: kernel 4.3-rc1 heads up

Posted: 30. Sep 2015, 08:00
by ckujau
Great, I found the commit now, too.