linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* next-20151231 - aes crypto algorithm went missing?
@ 2016-01-03  5:34 Valdis Kletnieks
  2016-01-03 10:20 ` Milan Broz
  0 siblings, 1 reply; 3+ messages in thread
From: Valdis Kletnieks @ 2016-01-03  5:34 UTC (permalink / raw)
  To: Herbert Xu, David S. Miller; +Cc: linux-kernel, linux-crypto

[-- Attachment #1: Type: text/plain, Size: 2811 bytes --]

So booting into a next-20151222 kernel, I can mount an external drive
that uses cryptLuks.  I try -1231, and I get this failure:

Failed to setup dm-crypt key mapping for device /dev/sdb2.
Check that kernel supports aes-cbc-essiv:sha256 cipher (check syslog for more info).

Tracked it down to this difference in /proc/crypto between the 12/22 and 12/31:

diff -u crypto.1222 crypto.1231
--- crypto.1222 2016-01-03 00:16:28.912507156 -0500
+++ crypto.1231 2016-01-03 00:09:14.243081574 -0500
@@ -1,37 +1,8 @@
-name         : ecb(aes)
-driver       : ecb(aes-asm)
-module       : kernel
-priority     : 200
-refcnt       : 1
-selftest     : passed
-internal     : no
-type         : blkcipher
-blocksize    : 16
-min keysize  : 16
-max keysize  : 32
-ivsize       : 0
-geniv        : <default>
-
-name         : cbc(aes)
-driver       : cbc(aes-asm)
-module       : kernel
-priority     : 200
-refcnt       : 2
-selftest     : passed
-internal     : no
-type         : givcipher
-async        : no
-blocksize    : 16
-min keysize  : 16
-max keysize  : 32
-ivsize       : 16
-geniv        : eseqiv
-
 name         : ccm(aes)
 driver       : ccm_base(ctr(aes-asm),aes-asm)
 module       : kernel
 priority     : 200

Not seeing any obvious error messages about failed self-tests in dmesg output.

Not seeing a difference in .config that would explain it:

grep AES /boot/config-4.4.0-rc[67]*
/boot/config-4.4.0-rc6-next-20151222-dirty:CONFIG_CRYPTO_AES=y
/boot/config-4.4.0-rc6-next-20151222-dirty:CONFIG_CRYPTO_AES_X86_64=y
/boot/config-4.4.0-rc6-next-20151222-dirty:# CONFIG_CRYPTO_AES_NI_INTEL is not set
/boot/config-4.4.0-rc6-next-20151222-dirty:CONFIG_CRYPTO_CAMELLIA_AESNI_AVX_X86_64=m
/boot/config-4.4.0-rc6-next-20151222-dirty:CONFIG_CRYPTO_CAMELLIA_AESNI_AVX2_X86_64=m
/boot/config-4.4.0-rc7-next-20151231-00006-gc66c8c42ba97:CONFIG_CRYPTO_AES=y
/boot/config-4.4.0-rc7-next-20151231-00006-gc66c8c42ba97:CONFIG_CRYPTO_AES_X86_64=y
/boot/config-4.4.0-rc7-next-20151231-00006-gc66c8c42ba97:# CONFIG_CRYPTO_AES_NI_INTEL is not set
/boot/config-4.4.0-rc7-next-20151231-00006-gc66c8c42ba97:CONFIG_CRYPTO_CAMELLIA_AESNI_AVX_X86_64=m
/boot/config-4.4.0-rc7-next-20151231-00006-gc66c8c42ba97:CONFIG_CRYPTO_CAMELLIA_AESNI_AVX2_X86_64=m

The module was built, and nothing's touched that source in a while:

[/usr/src/linux-next] find crypto/ -name '*aes*' -ls
  2104235     12 -rw-r--r--   1  source   source      11000 Jan  2 03:44 crypto/aes_generic.dwo
  2104241     32 -rw-r--r--   1  source   source      32645 Jan  2 03:44 crypto/.aes_generic.o.cmd
  2111768     64 -rw-r--r--   1  source   source      63440 Jan 20  2015 crypto/aes_generic.c
  2104179     56 -rw-r--r--   1  source   source      54664 Jan  2 03:44 crypto/aes_generic.o

This ringing any bells, before I start the New Year with a bisect? :)


[-- Attachment #2: Type: application/pgp-signature, Size: 848 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: next-20151231 - aes crypto algorithm went missing?
  2016-01-03  5:34 next-20151231 - aes crypto algorithm went missing? Valdis Kletnieks
@ 2016-01-03 10:20 ` Milan Broz
  2016-01-05  6:02   ` Valdis.Kletnieks
  0 siblings, 1 reply; 3+ messages in thread
From: Milan Broz @ 2016-01-03 10:20 UTC (permalink / raw)
  To: Valdis Kletnieks, Herbert Xu, David S. Miller; +Cc: linux-kernel, linux-crypto

On 01/03/2016 06:34 AM, Valdis Kletnieks wrote:
> So booting into a next-20151222 kernel, I can mount an external drive
> that uses cryptLuks.  I try -1231, and I get this failure:
> 
> Failed to setup dm-crypt key mapping for device /dev/sdb2.
> Check that kernel supports aes-cbc-essiv:sha256 cipher (check syslog for more info).
> 
> Tracked it down to this difference in /proc/crypto between the 12/22 and 12/31:

...
> This ringing any bells, before I start the New Year with a bisect? :)

Perhaps see the discussion in thread
[PATCH v2] crypto: algif_skcipher - Require setkey before accept(2)

Could you try to revert this patch?
http://git.kernel.org/cgit/linux/kernel/git/next/linux-next-history.git/commit/crypto?id=9f47e11b9e3169ff4cb35b3cdac0e0f7c2fcfe27

Milan

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: next-20151231 - aes crypto algorithm went missing?
  2016-01-03 10:20 ` Milan Broz
@ 2016-01-05  6:02   ` Valdis.Kletnieks
  0 siblings, 0 replies; 3+ messages in thread
From: Valdis.Kletnieks @ 2016-01-05  6:02 UTC (permalink / raw)
  To: Milan Broz; +Cc: Herbert Xu, David S. Miller, linux-kernel, linux-crypto

[-- Attachment #1: Type: text/plain, Size: 952 bytes --]

On Sun, 03 Jan 2016 11:20:03 +0100, Milan Broz said:
> On 01/03/2016 06:34 AM, Valdis Kletnieks wrote:
> > So booting into a next-20151222 kernel, I can mount an external drive
> > that uses cryptLuks.  I try -1231, and I get this failure:
> >
> > Failed to setup dm-crypt key mapping for device /dev/sdb2.
> > Check that kernel supports aes-cbc-essiv:sha256 cipher (check syslog for more info).
> >
> > Tracked it down to this difference in /proc/crypto between the 12/22 and 12/31:
>
> ...
> > This ringing any bells, before I start the New Year with a bisect? :)
>
> Perhaps see the discussion in thread
> [PATCH v2] crypto: algif_skcipher - Require setkey before accept(2)
>
> Could you try to revert this patch?
> http://git.kernel.org/cgit/linux/kernel/git/next/linux-next-history.git/commit/crypto?id=9f47e11b9e3169ff4cb35b3cdac0e0f7c2fcfe27

Confirming that this patch reverts cleanly for me, and makes cryptsetup
happy again on next-20151231.

[-- Attachment #2: Type: application/pgp-signature, Size: 848 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-01-05  6:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-03  5:34 next-20151231 - aes crypto algorithm went missing? Valdis Kletnieks
2016-01-03 10:20 ` Milan Broz
2016-01-05  6:02   ` Valdis.Kletnieks

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).