This fails with exceptional uselessness if you (as I am) are using a kernel which does not allow module loading at all.
The check for a kernel module in the file system should only be carried out if no aes ciphers are found in /proc/crypto.
Probably as so:
+++/lib/cryptsetup/cryptdisks.functions:
load_optimized_aes_module () {
local asm_module modulesdir
+
+ # only load if not already loaded
+ local drv_loaded=`cat /proc/crypto | grep driver\ *:\ *aes-`
+ if [ -z "$drv_loaded" ]; then
# find directory with kernel modules modulesdir="/lib/modules/`uname -r`"
# Add assembly optimized AES module if it exists asm_module=`ls -1 "$modulesdir"/kernel/arch/*/*/aes*.ko`
if [ $asm_module ];then
insmod $asm_module 2>/dev/null || true
fi
+
+ fi
}
Additionally the check should be weakened to not fail if the module does not load:
+++/lib/cryptsetup/cryptdisks.functions:
do_start () {
local dst src key opts result
This fails with exceptional uselessness if you (as I am) are using a kernel which does not allow module loading at all.
The check for a kernel module in the file system should only be carried out if no aes ciphers are found in /proc/crypto.
Probably as so: cryptsetup/ cryptdisks. functions:
+++/lib/
load_optimized_ aes_module () {
local asm_module modulesdir
+
+ # only load if not already loaded
+ local drv_loaded=`cat /proc/crypto | grep driver\ *:\ *aes-`
+ if [ -z "$drv_loaded" ]; then
# find directory with kernel modules
modulesdir= "/lib/modules/ `uname -r`"
asm_module= `ls -1 "$modulesdir" /kernel/ arch/*/ */aes*. ko`
# Add assembly optimized AES module if it exists
if [ $asm_module ];then
insmod $asm_module 2>/dev/null || true
fi
+
+ fi
}
Additionally the check should be weakened to not fail if the module does not load:
+++/lib/ cryptsetup/ cryptdisks. functions:
do_start () {
local dst src key opts result
modprobe -qb dm-mod || true
log_action_ begin_msg "Starting $INITSTATE crypto disks" aes_module aes_module || true
modprobe -qb dm-crypt || true
dmsetup mknodes > /dev/null 2>&1 || true
- load_optimized_
+ load_optimized_
mount_fs