Out of tree module fails to load

Discuss usability issues, general maintenance, and general support issues for a grsecurity-enabled system.

Out of tree module fails to load

Postby careta » Mon Jul 06, 2015 12:36 pm

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!
careta
 
Posts: 11
Joined: Sun May 18, 2014 6:43 pm

Re: Out of tree module fails to load

Postby PaX Team » Mon Jul 06, 2015 1:42 pm

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.
PaX Team
 
Posts: 2310
Joined: Mon Mar 18, 2002 4:35 pm

Re: Out of tree module fails to load

Postby careta » Tue Jul 07, 2015 4:36 am

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).
careta
 
Posts: 11
Joined: Sun May 18, 2014 6:43 pm

Re: Out of tree module fails to load

Postby PaX Team » Tue Jul 07, 2015 6:07 am

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.
PaX Team
 
Posts: 2310
Joined: Mon Mar 18, 2002 4:35 pm


Return to grsecurity support

cron