I'm trying to get a grsec-enabled kernel running on a Debian 8 ("Jessie") system. However, when I try to boot the newly compiled kernel, modprobe fails to load kernel modules because it is unable to properly resolve various symbols.
Here's my setup:
The system storage is backed with a software RAID5, created using mdadm, and a dm-crypt partition holds the root file system.
Because I'm running Debian, I'd like to keep my kernel as similar to upstream as possible, minus the various patches the maintainers apply to the vanilla kernel. So, I grabbed the kernel config from Debian's "experimental" repo (currently 4.0-1~exp1) and downloaded the sources for Linux 4.0.2 and the current grsecurity patch. I then enable grsec and compile the kernel. (You can download the .config I've created from https://calenhad.com/grsec-config)
But, when I boot the new kernel I get this error:
- Code: Select all
modprobe: can't load module md_mod (kernel/drivers/md/md-mod.ko): unknown symbol in module, or unknown parameter
modprobe: can't load module dm-mod (kernel/drivers/md/dm-mod.ko): unknown symbol in module, or unknown parameter
Letting the system eventually fall into an emergency shell I was able to run dmesg and see that the missing symbols were
- Code: Select all
unregister_reboot_notifier
- Code: Select all
out_of_line_wait_on_bit
I did find this thread viewtopic.php?f=3&t=3701&p=13376 that at least mentioned modprobe and unknown symbols. I tried disabling CONFIG_GRKERNSEC_HIDESYM in my config to see if that would fix the problem. Trying this change did allow md_mod to load, but dm-mod still fails, although with a different unresolved symbol:
- Code: Select all
call_rcu_sched
I have verified that a plain, vanilla 4.0.2 kernel with Debian's upstream config as a base boots properly on this system. Changing to a grsec one fails.
Has anyone else run into this sort of problem before? I'd appreciate any suggestions or solutions!