[Pkg-cryptsetup-devel] Bug#445186: Bug#445186: cryptsetup: Please load optimized cipher kernel modules by default
Reinhard Tartler
siretart at ubuntu.com
Thu Oct 4 15:36:08 UTC 2007
David Härdeman <david at hardeman.nu> writes:
> On Wed, October 3, 2007 22:52, Reinhard Tartler wrote:
>> In ubuntu, we have patched cryptsetup so that it looks for
>> optimized ciphers kernel modules and loads them if
>> available. Please consider merging this patch to debian.
>
> In general a good idea, some comments below:
[...]
>
> It seems unnecessary to have an aes-specific function, why not:
>
> load_optimized_module() {
> local module optmodule
> module="$1"
>
> optmodule=$(find "/lib/modules/$(uname -r)/kernel/arch" -name
> "${module}*.ko" 2> /dev/null)
> if [ -n "$optmodule" ] && [ "$(echo -n "$optmodule" | wc -l)" -eq
> 1 ]; then
> modprobe "$optmodule" 2>/dev/null && return 0
> fi
>
> modprobe "$module" 2>/dev/null || return 1
> return 0
> }
>
> (I haven't tested that code, I just wrote it up to show the idea)
I agree that this is a more general and better idea. If you apply
something like this to the debian package, I'll merge it in the ubuntu
package. (I don't know when I'll have time to improve this patch, not
before perhaps 2 weeks or so).
[...]
> And then a copy of the function above, but with manual_add_modules instead
> of modprobe, can be added to the initramfs hook.
Indeed, that would minimize code duplication. Good idea.
--
Gruesse/greetings,
Reinhard Tartler, KeyID 945348A4
More information about the Pkg-cryptsetup-devel
mailing list