2015-04-17 20:12:34

by Murilo Opsfelder Araujo

[permalink] [raw]
Subject: Device mapper failed to open temporary keystore device

Hello, everyone.

Right after I enter my passphrase to unlock my cryptsetup partition,
it displays the following error and asks for cryptsetup password again
(it got stuck on this loop).

This issue was introduced in next-20150413. next-20150410 is working just fine.

Any hint on how to debug this?

Unlocking the disk /dev/disk/by-uuid/<uuid> (sda5_crypt)
Enter passphrase: *****
[ 244.239821] device-mapper: table: 252:0: crypt: Error allocating crypto tfm
device-mapper: reload ioctl on failed: No such file or directory
Failed to open temporary keystore device.
device-mapper: remove ioctl on temporary-cryptsetup-239 failed: No
such device or address
device-mapper: reload ioctl on temporary-cryptsetup-239 failed: No
such device or address
device-mapper: remove ioctl on temporary-cryptsetup-239 failed: No
such device or address
device-mapper: remove ioctl on temporary-cryptsetup-239 failed: No
such device or address
device-mapper: remove ioctl on temporary-cryptsetup-239 failed: No
such device or address
device-mapper: remove ioctl on temporary-cryptsetup-239 failed: No
such device or address

--
Murilo


2015-04-17 22:40:20

by Mike Snitzer

[permalink] [raw]
Subject: Re: Device mapper failed to open temporary keystore device

On Fri, Apr 17 2015 at 4:11pm -0400,
Murilo Opsfelder Ara?jo <[email protected]> wrote:

> Hello, everyone.
>
> Right after I enter my passphrase to unlock my cryptsetup partition,
> it displays the following error and asks for cryptsetup password again
> (it got stuck on this loop).
>
> This issue was introduced in next-20150413. next-20150410 is working just fine.
>
> Any hint on how to debug this?
>
> Unlocking the disk /dev/disk/by-uuid/<uuid> (sda5_crypt)
> Enter passphrase: *****
> [ 244.239821] device-mapper: table: 252:0: crypt: Error allocating crypto tfm
> device-mapper: reload ioctl on failed: No such file or directory
> Failed to open temporary keystore device.
> device-mapper: remove ioctl on temporary-cryptsetup-239 failed: No
> such device or address
> device-mapper: reload ioctl on temporary-cryptsetup-239 failed: No
> such device or address
> device-mapper: remove ioctl on temporary-cryptsetup-239 failed: No
> such device or address
> device-mapper: remove ioctl on temporary-cryptsetup-239 failed: No
> such device or address
> device-mapper: remove ioctl on temporary-cryptsetup-239 failed: No
> such device or address
> device-mapper: remove ioctl on temporary-cryptsetup-239 failed: No
> such device or address

git diff next-20150410^..next-20150413 drivers/md/dm-crypt.c points to
this commit as the nly dm-crpt.c change:
https://git.kernel.org/cgit/linux/kernel/git/device-mapper/linux-dm.git/commit/?h=for-next&id=5977907937afa2b5584a874d44ba6c0f56aeaa9c

Which appears unrelated given your "crypt: Error allocating crypto tfm"
error.

But any chance you can try reverting that commit from next-20150413 and
re-test just to be absolutely sure?

There are also some crypto changes that could very easily be the cause
of your problem (cc'ing Herbert), e.g.:

$ git diff next-20150410^..next-20150413 -- crypto | diffstat
algapi.c | 13 ++++-
algif_hash.c | 4 -
algif_skcipher.c | 4 -
sha1_generic.c | 102 ++++++++----------------------------------
sha256_generic.c | 133 ++++++++-----------------------------------------------
sha512_generic.c | 123 ++++++++------------------------------------------
6 files changed, 76 insertions(+), 303 deletions(-)

2015-04-18 02:00:28

by Herbert Xu

[permalink] [raw]
Subject: Re: Device mapper failed to open temporary keystore device

On Fri, Apr 17, 2015 at 06:38:49PM -0400, Mike Snitzer wrote:
>
> There are also some crypto changes that could very easily be the cause
> of your problem (cc'ing Herbert), e.g.:
>
> $ git diff next-20150410^..next-20150413 -- crypto | diffstat

My guess is that you guys need this patch:

commit 34c9a0ffc75ad25b6a60f61e27c4a4b1189b8085
Author: Herbert Xu <[email protected]>
Date: Thu Apr 16 11:07:13 2015 +0800

crypto: fix broken crypto_register_instance() module handling

Cheers,
--
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

2015-04-19 17:04:39

by Murilo Opsfelder Araujo

[permalink] [raw]
Subject: Re: Device mapper failed to open temporary keystore device

On Fri, Apr 17, 2015 at 7:38 PM, Mike Snitzer <[email protected]> wrote:
> On Fri, Apr 17 2015 at 4:11pm -0400,
> Murilo Opsfelder Ara?jo <[email protected]> wrote:
>
>> Hello, everyone.
>>
>> Right after I enter my passphrase to unlock my cryptsetup partition,
>> it displays the following error and asks for cryptsetup password again
>> (it got stuck on this loop).
>>
>> This issue was introduced in next-20150413. next-20150410 is working just fine.
>>
>> Any hint on how to debug this?
>>
>> Unlocking the disk /dev/disk/by-uuid/<uuid> (sda5_crypt)
>> Enter passphrase: *****
>> [ 244.239821] device-mapper: table: 252:0: crypt: Error allocating crypto tfm
>> device-mapper: reload ioctl on failed: No such file or directory
>> Failed to open temporary keystore device.
>> device-mapper: remove ioctl on temporary-cryptsetup-239 failed: No
>> such device or address
>> device-mapper: reload ioctl on temporary-cryptsetup-239 failed: No
>> such device or address
>> device-mapper: remove ioctl on temporary-cryptsetup-239 failed: No
>> such device or address
>> device-mapper: remove ioctl on temporary-cryptsetup-239 failed: No
>> such device or address
>> device-mapper: remove ioctl on temporary-cryptsetup-239 failed: No
>> such device or address
>> device-mapper: remove ioctl on temporary-cryptsetup-239 failed: No
>> such device or address
>
> git diff next-20150410^..next-20150413 drivers/md/dm-crypt.c points to
> this commit as the nly dm-crpt.c change:
> https://git.kernel.org/cgit/linux/kernel/git/device-mapper/linux-dm.git/commit/?h=for-next&id=5977907937afa2b5584a874d44ba6c0f56aeaa9c
>
> Which appears unrelated given your "crypt: Error allocating crypto tfm"
> error.
>
> But any chance you can try reverting that commit from next-20150413 and
> re-test just to be absolutely sure?

Hello, Mike.

I've reverted that commit from both next-20150413 and next-20150415.
In both cases, I got the same error, no success.

--
Murilo

2015-04-19 17:09:21

by Murilo Opsfelder Araujo

[permalink] [raw]
Subject: Re: Device mapper failed to open temporary keystore device

On Fri, Apr 17, 2015 at 11:00 PM, Herbert Xu
<[email protected]> wrote:
> On Fri, Apr 17, 2015 at 06:38:49PM -0400, Mike Snitzer wrote:
>>
>> There are also some crypto changes that could very easily be the cause
>> of your problem (cc'ing Herbert), e.g.:
>>
>> $ git diff next-20150410^..next-20150413 -- crypto | diffstat
>
> My guess is that you guys need this patch:
>
> commit 34c9a0ffc75ad25b6a60f61e27c4a4b1189b8085
> Author: Herbert Xu <[email protected]>
> Date: Thu Apr 16 11:07:13 2015 +0800
>
> crypto: fix broken crypto_register_instance() module handling
>
> Cheers,
> --
> Email: Herbert Xu <[email protected]>
> Home Page: http://gondor.apana.org.au/~herbert/
> PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Hello, Herbert.

Sorry for my ignorance but which tree and branch does this commit come from?

--
Murilo

2015-04-22 23:49:39

by Murilo Opsfelder Araujo

[permalink] [raw]
Subject: Re: Device mapper failed to open temporary keystore device

On Sun, Apr 19, 2015 at 2:08 PM, Murilo Opsfelder Ara?jo
<[email protected]> wrote:
> On Fri, Apr 17, 2015 at 11:00 PM, Herbert Xu
> <[email protected]> wrote:
>> On Fri, Apr 17, 2015 at 06:38:49PM -0400, Mike Snitzer wrote:
>>>
>>> There are also some crypto changes that could very easily be the cause
>>> of your problem (cc'ing Herbert), e.g.:
>>>
>>> $ git diff next-20150410^..next-20150413 -- crypto | diffstat
>>
>> My guess is that you guys need this patch:
>>
>> commit 34c9a0ffc75ad25b6a60f61e27c4a4b1189b8085
>> Author: Herbert Xu <[email protected]>
>> Date: Thu Apr 16 11:07:13 2015 +0800
>>
>> crypto: fix broken crypto_register_instance() module handling
>>
>> Cheers,
>> --
>> Email: Herbert Xu <[email protected]>
>> Home Page: http://gondor.apana.org.au/~herbert/
>> PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
>
> Hello, Herbert.
>
> Sorry for my ignorance but which tree and branch does this commit come from?
>
> --
> Murilo

I tried next-20150422 (that contained Herbert's patch) and it worked just fine.

Thank you, guys.

--
Murilo