]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
crypto: tcrypt - fix ghash-generic speed test
authorHoria Geantă <horia.geanta@nxp.com>
Wed, 12 Sep 2018 13:20:48 +0000 (16:20 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 13 Nov 2018 19:15:07 +0000 (11:15 -0800)
commit0c8496c52a98039b6d8ca46db2f4478779b957fe
tree354f5f6ef1c2c26bcc5feffcc6dc3e410bbfd61a
parente86f4842f84a4494227aa4d1ab76acb68d86fb1a
crypto: tcrypt - fix ghash-generic speed test

commit 331351f89c36bf7d03561a28b6f64fa10a9f6f3a upstream.

ghash is a keyed hash algorithm, thus setkey needs to be called.
Otherwise the following error occurs:
$ modprobe tcrypt mode=318 sec=1
testing speed of async ghash-generic (ghash-generic)
tcrypt: test  0 (   16 byte blocks,   16 bytes per update,   1 updates):
tcrypt: hashing failed ret=-126

Cc: <stable@vger.kernel.org> # 4.6+
Fixes: 0660511c0bee ("crypto: tcrypt - Use ahash")
Tested-by: Franck Lenormand <franck.lenormand@nxp.com>
Signed-off-by: Horia Geantă <horia.geanta@nxp.com>
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
crypto/tcrypt.c