]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: hash - Add real ahash walk interface
authorHerbert Xu <herbert@gondor.apana.org.au>
Wed, 21 May 2014 12:56:12 +0000 (20:56 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Wed, 21 May 2014 12:56:12 +0000 (20:56 +0800)
commit3920591f48c5f14bf4d90ffe154ce1b89e017c77
treeeb185e64a01a81de14fdc3e380f7273b09bf76a4
parent4a6d8d42ad7020570765a68c2acdae65f0f57373
crypto: hash - Add real ahash walk interface

Although the existing hash walk interface has already been used
by a number of ahash crypto drivers, it turns out that none of
them were really asynchronous.  They were all essentially polling
for completion.

That's why nobody has noticed until now that the walk interface
couldn't work with a real asynchronous driver since the memory
is mapped using kmap_atomic.

As we now have a use-case for a real ahash implementation on x86,
this patch creates a minimal ahash walk interface.  Basically it
just calls kmap instead of kmap_atomic and does away with the
crypto_yield call.  Real ahash crypto drivers don't need to yield
since by definition they won't be hogging the CPU.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/ahash.c
include/crypto/internal/hash.h