Hi all,
I can't open my LUKS formatted crypto files in 3.6 any more while 3.4
works fine.
Error is:
# cryptsetup --key-file=- luksOpen /luks.file target
Enter passphrase:
device-mapper: reload ioctl on failed: No such file or directory
Failed to setup dm-crypt key mapping for device /dev/loop0.
Check that kernel supports aes-cbc-essiv:sha256 cipher (check syslog for
more info).
Failed to read from key storage.
I don't think kernel misses any modules because:
a) I built 3.6 from 3.4 config via make oldconfig, and,
b) I checked what crypto modules get loaded under 3.4 and loaded them
under 3.6 before attempting to run cryptsetup. Those are:
Module Size Used by
sha256_generic 10207 0
cryptd 8665 0
aes_x86_64 7614 0
aes_generic 26764 1 aes_x86_64
I am not sure module auto-loading for crypto works under 3.6 because if
I just run the cryptsetup command none of the above gets loaded.
But I repeat, even if I load the required modules before hand things do
not work.
Kernel says this:
device-mapper: table: 252:1: crypt: Error allocating crypto tfm
device-mapper: ioctl: error adding target to table
And strace on cryptsetup says there DM ioctls are issued:
ioctl(3, DM_VERSION, 0x1d65db0) = 0
ioctl(3, DM_LIST_VERSIONS, 0x1d65d20) = 0
ioctl(3, DM_TABLE_STATUS, 0x1d66730) = -1 ENXIO (No such device or
address)
ioctl(3, DM_DEV_CREATE, 0x1d78290) = 0
ioctl(3, DM_TABLE_LOAD, 0x1d78290) = -1 ENOENT (No such file or directory)
ioctl(3, DM_DEV_REMOVE, 0x1d781d0) = 0
Perhaps I am missing something obvious?
Thanks,
Tvrtko
On 10/20/2012 10:44 PM, Tvrtko Ursulin wrote:
> But I repeat, even if I load the required modules before hand things do
> not work.
I would say you are still missing some modules.
> Kernel says this:
> device-mapper: table: 252:1: crypt: Error allocating crypto tfm
> device-mapper: ioctl: error adding target to table
It complains about aes-cbc-essiv:sha256.
It can be missing CBC od SHA256, but according the message I bet
you have no "cbc" block cipher mode module compiled.
Can you grep your final .config for CONFIG_CRYPTO_CBC and
CONFIG_CRYPTO_SHA256 a paste it here?
Milan
Hi,
On 21/10/12 10:53, Milan Broz wrote:
> On 10/20/2012 10:44 PM, Tvrtko Ursulin wrote:
>> But I repeat, even if I load the required modules before hand things do
>> not work.
>
> I would say you are still missing some modules.
>
>> Kernel says this:
>> device-mapper: table: 252:1: crypt: Error allocating crypto tfm
>> device-mapper: ioctl: error adding target to table
>
> It complains about aes-cbc-essiv:sha256.
>
> It can be missing CBC od SHA256, but according the message I bet
> you have no "cbc" block cipher mode module compiled.
>
> Can you grep your final .config for CONFIG_CRYPTO_CBC and
> CONFIG_CRYPTO_SHA256 a paste it here?
I both working 3.4 and non-working 3.6 situation is the same:
CONFIG_CRYPTO_CBC=y
CONFIG_CRYPTO_SHA256=m
Tvrtko