[dm-crypt] [RFC] dm-crypt and hardware-optimized crypto modules

Arno Wagner arno at wagner.name
Mon Oct 24 08:42:44 CEST 2011

On Mon, Oct 24, 2011 at 08:29:57AM +0200, Milan Broz wrote:
> On 10/24/2011 01:30 AM, Jonas Meurer wrote:
> If the modules are present at this time (either compiled-in or as separate
> modules) this seems to be kernel cryptoAPI bug.

So if it is loaded by the autoloader it should try the HW module first
and only if that fails load the SW module? Makes sense.

> If it is not present (in intramfs) then available module is used and later
> it is not replaced by hw accelerated driver.
> Anyway, I am using aesni_intel loaded from Debian initramfs and it works
> with no hacks. Wonder what is the difference...
> (kernel 3.0.3 but compiled with own config to own kernel deb package.)

Ah, yes, I fogot: There is an organized and documented process for 
rolling your own Debian kernel package. I have not used it though.

> > I'm happy to extend the initramfs scripts to load hardware-optimized
> > modules in case they're available before cryptsetup is invoked. But
> > that an implementation would be ugly and hard to maintain as it needs
> > to be updated for possible kernel crypto driver changes. I would
> > prefer a solution where the kernel crypto api took responsibility for
> > this task.
> I think it should load modules automatically according to its priorities
> (hw has always higher priority). Anyway, this is the question
> for linux-crypto (kernel) list.
> There is no way how to force dm-crypt load specific driver.

You could do a wrapper and unload the software AES module if loaded. 
That would be a pretty dirty hack though.

BTW, nice to see RH folks using Debian ;-)

Arno Wagner, Dr. sc. techn., Dipl. Inform., CISSP -- Email: arno at wagner.name 
GnuPG:  ID: 1E25338F  FP: 0C30 5782 9D93 F785 E79C  0296 797F 6B50 1E25 338F
Cuddly UI's are the manifestation of wishful thinking. -- Dylan Evans

If it's in the news, don't worry about it.  The very definition of 
"news" is "something that hardly ever happens." -- Bruce Schneier 

More information about the dm-crypt mailing list