Skip to contentSkip to conversation

How to use current KVM with non-modular kernel

DISCUSSION Felix Leimbach 5 participants 6 messages Sep 3, 2008 KVM

lore
Share & tools
lore
#0 lore raw

Hello list,

due to security concerns I have kvm hosts which have non-modular kernels, i.e. CONFIG_MODULES is not set. I'd like to use the latest KVM kernel code with those, but cannot not always upgrade to the latest kernel.org kernel.

Is it possible to update kernel sources to include the latest and greatest kvm? For example to have 2.6.25.16 kernel with the kvm-74 module *compiled in*.

-Felix

#1 lore raw
Quoted 7 lines · Felix Leimbach

Hello list,

due to security concerns I have kvm hosts which have non-modular kernels, i.e. CONFIG_MODULES is not set. I'd like to use the latest KVM kernel code with those, but cannot not always upgrade to the latest kernel.org kernel.

Is it possible to update kernel sources to include the latest and greatest kvm? For example to have 2.6.25.16 kernel with the kvm-74 module *compiled in*.

You could copy the kernel files in the kvm-74 distribution into a new directory in the Linux source tree, add '#include "external-module-compat.h" to the top of all of them, and hack a Kbuild for them. It would take some effort, but should work.

Signature · 1 line
error compiling committee.c: too many arguments to function
#3 lore raw
Quoted 3 lines · Charles Duffy

Would it not address your security concerns to build a modular kernel, load the current kvm module, and then drop CAP_SYS_MODULE as part of your boot scripts?

Seems that this could be less than ideal if you're providing the VMs as hosts for clients (perhaps in a VPS-type situation).

#4 lore raw
Quoted 7 lines · Thomas Lockney
Quoted 3 lines · Charles Duffy

Would it not address your security concerns to build a modular kernel, load the current kvm module, and then drop CAP_SYS_MODULE as part of your boot scripts?

Seems that this could be less than ideal if you're providing the VMs as hosts for clients (perhaps in a VPS-type situation).

the module loading and capability dropping would be done at host boot, not guests

Signature · 1 line
Javier
#5 lore raw
Quoted 2 lines · Javier Guerra

the module loading and capability dropping would be done at host boot, not guests

Ah, right, momentary lapse of reason there. Thanks for pointing out the correction. ;~)