You are not logged in.

#1 2009-11-15 10:58:30

mico
Member
From: Slovenia
Registered: 2004-02-08
Posts: 247

[SOLVED] How to prevent loading a kernel module in early stage?

I have a VIA Epia board with padlock (crypto co-processor). Unfortunately the drivers are not very stable and I get a kernel panic when I mount a LUKS partition. If padlock-aes and padlock-sha modules are not loaded the CPU takes the padlock's job and partitions mount fine.

Those modules are used already when root partition mounts and I can't disable them in /etc/rc.conf or /etc/modprobe.d/modprobe.conf, Is there any other way besides removing padlock*.ko files or recompiling the kernel?

Last edited by mico (2009-11-16 20:21:49)

Offline

#2 2009-11-15 11:16:58

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,217
Website

Re: [SOLVED] How to prevent loading a kernel module in early stage?

Do you mean they're loaded during init, or early in the kernel process? How did you try disabling them in rc.conf?

Offline

#3 2009-11-15 17:53:55

mico
Member
From: Slovenia
Registered: 2004-02-08
Posts: 247

Re: [SOLVED] How to prevent loading a kernel module in early stage?

When I log in and do a lsmod, they are there. Can't even rmmod them because they are always used because I use LUKS encryption also for root partition.

rc.conf:

MODULES=(!padlock_aes !padlock_sha)

modprobe.conf:

blacklist padlock_aes
blacklist padlock_sha

When the system starts booting and I enter password for root partition, they must already be loaded because it says something like "VIA padlock detected". Depending on encryption algorithm used for partitions the system may continue booting or I get kernel panic. With kernel that does not include those modules I don't get that message and all works fine. I believe the modules are added to initial ramdisk when mkinitcpio is executed.

Offline

#4 2009-11-15 19:56:40

Dheart
Member
From: Sofia, Bulgaria
Registered: 2006-10-26
Posts: 956

Re: [SOLVED] How to prevent loading a kernel module in early stage?

Probably those modules are built in the inicpion.
Check your /etc/mkinitcpio.conf
After you've added those lines in /etc/modprobe.conf I think you just need to uncomment your FILES section in /etc/mkinitcpio.conf.
It should look like that:

# FILES
# This setting is similar to BINARIES above, however, files are added
# as-is and are not parsed in anyway.  This is useful for config files.
# Some users may wish to include modprobe.conf for custom module options,
# like so:
    FILES="/etc/modprobe.d/modprobe.conf"
#FILES=""

My victim you are meant to be
No, you cannot hide nor flee
You know what I'm looking for
Pleasure your torture, I will endure...

Offline

#5 2009-11-16 20:20:59

mico
Member
From: Slovenia
Registered: 2004-02-08
Posts: 247

Re: [SOLVED] How to prevent loading a kernel module in early stage?

That did it, thanks!

Offline

Board footer

Powered by FluxBB