News for hackers. Stuff that matters.
Re:Write your first Linux kernel module by Aardwolf on Friday May 30, 2014 @01:38PM (#7823021)
VirtualBox uses a kernel module, and that is annoying because the linux kernel API changes with every update, which means its kernel module needs to be recompiled. Since I update my Linux quite often, that basically means:

Everytime some friends call me to play a certain game online with each other, they need to be waiting a bit longer for me because I have yet again to recompile VirtualBox's kernel modules.

Is there a way to convert something that requires kernel modules, to run fully in userspace?

I'd be happy to lose some efficiency for this. Just a 100% reliable game to run my game would be perfect.

Are there things you can do only in kernel modules and not in userspace, and does VB need this? In theory userspace can do everything you need, right? Graphics, networking, audio, ...

Re:Write your first Linux kernel module by aquayellow on Friday May 30, 2014 @02:31PM (#7823282)
Virtualbox is an out-of-tree module and hence needs to be compiled. The base package is GPLv2 and is compatible with the Linux kernel license, but I don't know if Virtualbox developers ever tried to "upstream" their module. This is probably the easiest way to solve your problem. Most Virtualization Software these days use virtualization hardware extensions (Intel VMX/AMD SVM) and so the "hypervisor code" needs to be able to execute privileged instructions, eg - you can't run VMON from ring 3/userspace.
Re:Write your first Linux kernel module by justincormack on Saturday May 31, 2014 @06:21AM (#7825719)
Apparently the virtualbox code is terrible, hence the lack of upstreaming...
Re:Write your first Linux kernel module by jimmaswell on Friday May 30, 2014 @08:16PM (#7824748)
I'd just update the kernel less if i were you. There's not really much of a point updating the kernel all the time for normal use is there?
Re:Write your first Linux kernel module by Aardwolf on Saturday May 31, 2014 @04:56AM (#7825602)
Well, it's Archlinux, and the most basic usage pattern is to use "pacman -Syu", which updates everything (useful for updating your programs), including the kernel.
Re:Write your first Linux kernel module by drummer32 on Saturday May 31, 2014 @09:12AM (#7825918)
There is a kernel-lts packages that doesn't update as often, so you won't need to recompile every time.
Re:Write your first Linux kernel module by dTal on Monday June 02, 2014 @08:23AM (#7833070)
In Arch, failing to regularly update breaks your system. Also, regularly updating your system will definitely break it at some point (bleeding-edge dontcha know). The official position is that it's your own damn fault for upgrading or not upgrading, as the case may be.

Arch is broken by design.

Re:Write your first Linux kernel module by josteink on Friday May 30, 2014 @04:57PM (#7824032)
DKMS might help if you have access to the source.

https://en.m.wikipedia.org/wiki/Dynamic_Kernel_Module_Suppor...