• Ard Biesheuvel's avatar
    crypto: arm64/aes-neon - limit exposed routines if faster driver is enabled · 69b6f2e8
    Ard Biesheuvel authored
    The pure NEON AES implementation predates the bit-slicing one, and is
    generally slower, unless the algorithm in question can only execute
    sequentially.
    
    So advertising the skciphers that the bit-slicing driver implements as
    well serves no real purpose, and we can just disable them. Note that the
    bit-slicing driver also has a link time dependency on the pure NEON
    driver, for CBC encryption and for XTS tweak calculation, so we still
    need both drivers on systems that do not implement the Crypto Extensions.
    
    At the same time, expose those modaliases for the AES instruction based
    driver. This is necessary since otherwise, we may end up loading the
    wrong driver when any of the skciphers are instantiated before the CPU
    capability based module loading has completed.
    
    Finally, add the missing modalias for cts(cbc(aes)) so requests for
    this algorithm will autoload the correct module.
    Signed-off-by: default avatarArd Biesheuvel <ard.biesheuvel@linaro.org>
    Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
    69b6f2e8
aes-glue.c 26.3 KB