• Marcelo Cerri's avatar
    crypto: ctr - Propagate NEED_FALLBACK bit · d2c2a85c
    Marcelo Cerri authored
    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: default avatarMarcelo Henrique Cerri <marcelo.cerri@canonical.com>
    Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
    d2c2a85c
ctr.c 12.7 KB