]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
crypto: ctr - Propagate NEED_FALLBACK bit
authorMarcelo Cerri <marcelo.cerri@canonical.com>
Mon, 27 Feb 2017 12:38:26 +0000 (09:38 -0300)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 9 Mar 2017 10:34:39 +0000 (18:34 +0800)
commitd2c2a85cfe829f9d0736dba567edc86ba8524fb2
treed6e708d6dca58c5660b67c458594fde53f35e059
parente6c2e65c70a6f606ea764f301e4024c85e0cd7a8
crypto: ctr - Propagate NEED_FALLBACK bit

When requesting a fallback algorithm, we should propagate the
NEED_FALLBACK bit when search for the underlying algorithm.

This will prevents drivers from allocating unnecessary fallbacks that
are never called. For instance, currently the vmx-crypto driver will use
the following chain of calls when calling the fallback implementation:

p8_aes_ctr -> ctr(p8_aes) -> aes-generic

However p8_aes will always delegate its calls to aes-generic. With this
patch, p8_aes_ctr will be able to use ctr(aes-generic) directly as its
fallback. The same applies to aes_s390.

Signed-off-by: Marcelo Henrique Cerri <marcelo.cerri@canonical.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/ctr.c