Page 1 of 1
Out of tree module fails to load
Posted:
Mon Jul 06, 2015 12:36 pm
by careta
I'm trying to compile the acpi_call module from the Debian DKMS package. The compilation is successful, but I get the following message when trying to load the module:
[31332.100596] : version magic '4.0.4-grsec+ SMP preempt mod_unload modversions ' should be '4.0.4-grsec+ SMP preempt mod_unload modversions REFCOUNT STACKLEAK_PLUGIN GRSEC RANDSTRUCT_PLUGIN_13f93935ba6022e0cafe437fc3cdf56718e5b0c0ae84fa54ff87d26b24803f38'
Any hints on how can I solve this?
Thanks!
Re: Out of tree module fails to load
Posted:
Mon Jul 06, 2015 1:42 pm
by PaX Team
check your /lib/modules/*/build symlink, it should point to the kernel build dir (which has the gcc plugins among others) but i heard that the linux-headers package unilaterally overwrites it and you'll end up building your modules with the wrong tree.
Re: Out of tree module fails to load
Posted:
Tue Jul 07, 2015 4:36 am
by careta
Thanks for the answer, actually the symlink was good.
The problem is that I built the kernel package, the kernel headers and the kernel debug package but then did a make clean on the source tree.
So I guess I have to keep the source tree in a built state around? Is there any alternative package that I can built that installs the necessary files (I'm not sure if you are familiar with make-kpkg).
Re: Out of tree module fails to load
Posted:
Tue Jul 07, 2015 6:07 am
by PaX Team
it's a general kernel requirement for building external modules. you don't need a fully built build tree however, it's enough to run 'make modules_prepare' on it which will compile the gcc plugins as well among others. other than that i think the gcc plugins should be included in whatever package the kernel makefiles produce for debian but i'm not a debian user so it may have broken over time.
edit: i also think that make-kpkg is deprecated and you should use make deb-pkg instead.