kernel 4.3-rc1 heads up

Discussions related to using VirtualBox on Linux hosts.

kernel 4.3-rc1 heads up

Postby sboyce » 14. Sep 2015, 11:29

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
sboyce
 
Posts: 23
Joined: 10. Nov 2007, 02:47
Location: Halesowen, W. Midlands, UK

Re: kernel 4.3-rc1 heads up

Postby wifi » 16. Sep 2015, 05:22

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...
wifi
 
Posts: 2
Joined: 16. Sep 2015, 05:14

Re: kernel 4.3-rc1 heads up

Postby noteirak » 16. Sep 2015, 19:31

AFAIK rc stands for Release candidate, and is not specific to kernels. Any software would have that version label.
Hyperbox - Virtual Infrastructure Manager - https://kamax.io/hbox/
Manage your VirtualBox infrastructure the free way!
noteirak
Site Moderator
 
Posts: 5198
Joined: 13. Jan 2012, 11:14
Primary OS: Debian other
VBox Version: OSE Debian
Guest OSses: Debian, Win 2k8, Win 7

Re: kernel 4.3-rc1 heads up

Postby wifi » 16. Sep 2015, 21:12

Thank you for the answer :)...
wifi
 
Posts: 2
Joined: 16. Sep 2015, 05:14

Re: kernel 4.3-rc1 heads up

Postby loukingjr » 16. Sep 2015, 21:17

"Linux parrot 4.1.7-parrot-686-pae" doesn't say "-rc"
OSX, Linux and Windows Hosts & Guests
There are three groups of people. Those that can count and those that can't.
loukingjr
Volunteer
 
Posts: 8827
Joined: 30. Apr 2009, 09:45
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: just about all that run

Re: kernel 4.3-rc1 heads up

Postby sboyce » 18. Sep 2015, 13:06

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.
sboyce
 
Posts: 23
Joined: 10. Nov 2007, 02:47
Location: Halesowen, W. Midlands, UK

Re: kernel 4.3-rc1 heads up

Postby Valentin » 21. Sep 2015, 17:43

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)
Valentin
 
Posts: 2
Joined: 21. Sep 2015, 17:41

Re: kernel 4.3-rc1 heads up

Postby sboyce » 22. Sep 2015, 01:09

Thanks,
The patch worked.
sboyce
 
Posts: 23
Joined: 10. Nov 2007, 02:47
Location: Halesowen, W. Midlands, UK

Re: kernel 4.3-rc1 heads up

Postby ckujau » 29. Sep 2015, 05:57

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?
Attachments
vbox_linux-4.3.diff.txt
Valentin's patch attached as diff, so that it can applied more easily.
(1.21 KiB) Downloaded 166 times
ckujau
 
Posts: 7
Joined: 3. Oct 2013, 06:34
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, BSD, Solaris, Windows

Re: kernel 4.3-rc1 heads up

Postby incident41 » 29. Sep 2015, 11:08

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.
incident41
 
Posts: 53
Joined: 14. May 2012, 18:50
Location: Italy
Primary OS: Linux other
VBox Version: PUEL
Guest OSses: Windows 10 64-bit

Re: kernel 4.3-rc1 heads up

Postby ckujau » 30. Sep 2015, 08:00

Great, I found the commit now, too.
ckujau
 
Posts: 7
Joined: 3. Oct 2013, 06:34
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, BSD, Solaris, Windows


Return to VirtualBox on Linux Hosts

Who is online

Users browsing this forum: No registered users and 13 guests